lib: Use g_malloc0 instead of g_malloc+memset

This commit is contained in:
Bastien Nocera
2013-06-26 14:21:33 +02:00
parent 6d65bfcf80
commit f3dd55815e
2 changed files with 2 additions and 4 deletions

View File

@@ -47,8 +47,7 @@
struct fp_img *fpi_img_new(size_t length)
{
struct fp_img *img = g_malloc(sizeof(*img) + length);
memset(img, 0, sizeof(*img));
struct fp_img *img = g_malloc0(sizeof(*img) + length);
fp_dbg("length=%zd", length);
img->length = length;
return img;