summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorChristophe Christophe Marion <christophe.jaillet@wanadoo.fr>2012-06-18 22:10:27 +0200
committerMichael Meeks <michael.meeks@suse.com>2012-06-20 14:32:15 +0100
commitc4a3adc99cf7dc6598c3851588d58d2701210277 (patch)
treee66bc509cba8e49565248ceacfdbaa31c2a34bed /vcl/source
parent209f1cdc933e42d097c03b35cbf8a6f7d52314b4 (diff)
Remove some useless memset(0)
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/fontsubset/sft.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 26f31f2ea6ed..f21ca6c11f40 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1439,7 +1439,6 @@ static void GetKern(TrueTypeFont *ttf)
ttf->nkern = GetUInt16(table, 2, 1);
ttf->kerntables = (const sal_uInt8**)calloc(ttf->nkern, sizeof(sal_uInt8 *));
assert(ttf->kerntables != 0);
- memset(ttf->kerntables, 0, ttf->nkern * sizeof(sal_uInt8 *));
ttf->kerntype = KT_MICROSOFT;
ptr = table + 4;
for( unsigned i = 0; i < ttf->nkern; ++i) {
@@ -1457,9 +1456,8 @@ static void GetKern(TrueTypeFont *ttf)
if (GetUInt32(table, 0, 1) == 0x00010000) { /* MacOS style kern tables: fixed32 version and sal_uInt32 nTables fields */
ttf->nkern = GetUInt32(table, 4, 1);
- ttf->kerntables = (const sal_uInt8**)calloc(ttf->nkern, sizeof(sal_uInt8*));
+ ttf->kerntables = (const sal_uInt8**)calloc(ttf->nkern, sizeof(sal_uInt8 *));
assert(ttf->kerntables != 0);
- memset(ttf->kerntables, 0, ttf->nkern * sizeof(sal_uInt8 *));
ttf->kerntype = KT_APPLE_NEW;
ptr = table + 8;
for( unsigned i = 0; i < ttf->nkern; ++i) {
@@ -1624,14 +1622,11 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
if( t->ntables >= 128 )
return SF_TTFORMAT;
- t->tables = (const sal_uInt8**)calloc(NUM_TAGS, sizeof(sal_uInt8*));
+ t->tables = (const sal_uInt8**)calloc(NUM_TAGS, sizeof(sal_uInt8 *));
assert(t->tables != 0);
t->tlens = (sal_uInt32*)calloc(NUM_TAGS, sizeof(sal_uInt32));
assert(t->tlens != 0);
- memset(t->tables, 0, NUM_TAGS * sizeof(void *));
- memset(t->tlens, 0, NUM_TAGS * sizeof(sal_uInt32));
-
/* parse the tables */
for (i=0; i<(int)t->ntables; i++) {
int nIndex;