From 9be71be5bda27b068176ab9b982cf3d7d41a4acd Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 4 Dec 2014 15:00:02 +0100 Subject: [PATCH] util: Fuse g_malloc(); memset() into g_new0() Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Signed-off-by: Michael Tokarev --- util/uri.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/uri.c b/util/uri.c index 01dc09effb..918d23516d 100644 --- a/util/uri.c +++ b/util/uri.c @@ -1004,8 +1004,7 @@ URI * uri_new(void) { URI *ret; - ret = (URI *) g_malloc(sizeof(URI)); - memset(ret, 0, sizeof(URI)); + ret = g_new0(URI, 1); return(ret); }