vcl/source/fontsubset/sft.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
New commits: commit c4a3adc99cf7dc6598c3851588d58d2701210277 Author: Christophe Christophe Marion <[email protected]> Date: Mon Jun 18 22:10:27 2012 +0200 Remove some useless memset(0) diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 26f31f2..f21ca6c 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; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
