diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-09 14:34:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-09 16:26:20 +0100 |
commit | 587c02d2554111528a8c590dad9992bb423305a5 (patch) | |
tree | 1d2f88c402eb255f7b39395c0da042efe0993b6c /vcl | |
parent | c0096b5b8412a8bfd40b84491e6d6eccd6d98504 (diff) |
malloc + memset(0,..) -> calloc
Change-Id: Ic7c496259258bf36cd885ed68912b43117f348f0
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/fontsubset/ttcr.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx index ba52adc46b73..0f24e25ae417 100644 --- a/vcl/source/fontsubset/ttcr.cxx +++ b/vcl/source/fontsubset/ttcr.cxx @@ -412,9 +412,8 @@ static sal_uInt8 *ttmalloc(sal_uInt32 nbytes) sal_uInt32 n; n = (nbytes + 3) & (sal_uInt32) ~3; - sal_uInt8* res = static_cast<sal_uInt8*>(malloc(n)); + sal_uInt8* res = static_cast<sal_uInt8*>(calloc(n, 1)); assert(res != 0); - memset(res, 0, n); return res; } |