From 26622e239160e7dc9811c944d7567f0d8fbb0040 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 8 Sep 2015 18:06:21 +0200 Subject: [PATCH 3/7] util: Fuse g_malloc(); memset() into g_new0() Message-id: <1441735585-23432-4-git-send-email-armbru@redhat.com> Patchwork-id: 67704 O-Subject: [RHEL-7.2 qemu-kvm PATCH 3/7] util: Fuse g_malloc(); memset() into g_new0() Bugzilla: 1218919 RH-Acked-by: Laszlo Ersek RH-Acked-by: Fam Zheng RH-Acked-by: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Signed-off-by: Michael Tokarev (cherry picked from commit 9be71be5bda27b068176ab9b982cf3d7d41a4acd) Signed-off-by: Miroslav Rezanina --- util/uri.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/uri.c b/util/uri.c index 01dc09e..918d235 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); } -- 1.8.3.1