From f1b46bdaac18ec17477b3383a4827e41935396bd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 29 Jan 2009 09:19:56 +0000 Subject: [PATCH] Use calloc(), instead of malloc()ing and memset()ing. 2009-01-29 Behdad Esfahbod * pango/opentype/harfbuzz-impl.c (_hb_alloc): Use calloc(), instead of malloc()ing and memset()ing. svn path=/trunk/; revision=2818 --- ChangeLog | 5 +++++ pango/opentype/harfbuzz-impl.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4dada63..959e67f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-01-29 Behdad Esfahbod + * pango/opentype/harfbuzz-impl.c (_hb_alloc): Use calloc(), + instead of malloc()ing and memset()ing. + +2009-01-29 Behdad Esfahbod + * pango/opentype/harfbuzz-dump-main.c (main): Remove old cruft. 2009-01-29 Behdad Esfahbod diff --git a/pango/opentype/harfbuzz-impl.c b/pango/opentype/harfbuzz-impl.c index e2c8521..a3a5589 100644 --- a/pango/opentype/harfbuzz-impl.c +++ b/pango/opentype/harfbuzz-impl.c @@ -38,11 +38,9 @@ _hb_alloc( HB_UInt size, if ( size > 0 ) { - block = malloc( size ); + block = calloc( 1, size ); if ( !block ) error = ERR(HB_Err_Out_Of_Memory); - else - memset( (char*)block, 0, (size_t)size ); } *perror = error; -- 2.7.4