diff mbox

[2/3] Fuse g_malloc(); memset() into g_new0()

Message ID 1417701603-26388-3-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster Dec. 4, 2014, 2 p.m. UTC
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 util/uri.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Markus Armbruster Dec. 4, 2014, 2:04 p.m. UTC | #1
Oops, subject lacks "util: " prefix.  Perhaps it can be fixed up on
commit.
diff mbox

Patch

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);
 }