yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
05bba0
From 26622e239160e7dc9811c944d7567f0d8fbb0040 Mon Sep 17 00:00:00 2001
05bba0
From: Markus Armbruster <armbru@redhat.com>
05bba0
Date: Tue, 8 Sep 2015 18:06:21 +0200
05bba0
Subject: [PATCH 3/7] util: Fuse g_malloc(); memset() into g_new0()
05bba0
05bba0
Message-id: <1441735585-23432-4-git-send-email-armbru@redhat.com>
05bba0
Patchwork-id: 67704
05bba0
O-Subject: [RHEL-7.2 qemu-kvm PATCH 3/7] util: Fuse g_malloc(); memset() into g_new0()
05bba0
Bugzilla: 1218919
05bba0
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
05bba0
RH-Acked-by: Fam Zheng <famz@redhat.com>
05bba0
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
05bba0
05bba0
Signed-off-by: Markus Armbruster <armbru@redhat.com>
05bba0
Reviewed-by: Eric Blake <eblake@redhat.com>
05bba0
Reviewed-by: Fam Zheng <famz@redhat.com>
05bba0
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
05bba0
(cherry picked from commit 9be71be5bda27b068176ab9b982cf3d7d41a4acd)
05bba0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
05bba0
---
05bba0
 util/uri.c | 3 +--
05bba0
 1 file changed, 1 insertion(+), 2 deletions(-)
05bba0
05bba0
diff --git a/util/uri.c b/util/uri.c
05bba0
index 01dc09e..918d235 100644
05bba0
--- a/util/uri.c
05bba0
+++ b/util/uri.c
05bba0
@@ -1004,8 +1004,7 @@ URI *
05bba0
 uri_new(void) {
05bba0
     URI *ret;
05bba0
 
05bba0
-    ret = (URI *) g_malloc(sizeof(URI));
05bba0
-    memset(ret, 0, sizeof(URI));
05bba0
+    ret = g_new0(URI, 1);
05bba0
     return(ret);
05bba0
 }
05bba0
 
05bba0
-- 
05bba0
1.8.3.1
05bba0