diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2009-01-29 09:19:56 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2009-01-29 09:19:56 +0000 |
commit | f1b46bdaac18ec17477b3383a4827e41935396bd (patch) | |
tree | c2af0eee618ab480696d82d78da79bf6a660f03f | |
parent | 843ac6b5d199d6c93c011a9ad6c70b41f298ada7 (diff) | |
download | pango-f1b46bdaac18ec17477b3383a4827e41935396bd.tar.gz |
Use calloc(), instead of malloc()ing and memset()ing.
2009-01-29 Behdad Esfahbod <behdad@gnome.org>
* pango/opentype/harfbuzz-impl.c (_hb_alloc): Use calloc(),
instead of malloc()ing and memset()ing.
svn path=/trunk/; revision=2818
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | pango/opentype/harfbuzz-impl.c | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -1,5 +1,10 @@ 2009-01-29 Behdad Esfahbod <behdad@gnome.org> + * pango/opentype/harfbuzz-impl.c (_hb_alloc): Use calloc(), + instead of malloc()ing and memset()ing. + +2009-01-29 Behdad Esfahbod <behdad@gnome.org> + * pango/opentype/harfbuzz-dump-main.c (main): Remove old cruft. 2009-01-29 Behdad Esfahbod <behdad@gnome.org> diff --git a/pango/opentype/harfbuzz-impl.c b/pango/opentype/harfbuzz-impl.c index e2c85219..a3a55895 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; |