summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2009-01-29 09:19:56 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2009-01-29 09:19:56 +0000
commitf1b46bdaac18ec17477b3383a4827e41935396bd (patch)
treec2af0eee618ab480696d82d78da79bf6a660f03f /pango
parent843ac6b5d199d6c93c011a9ad6c70b41f298ada7 (diff)
downloadpango-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
Diffstat (limited to 'pango')
-rw-r--r--pango/opentype/harfbuzz-impl.c4
1 files changed, 1 insertions, 3 deletions
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;