aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-12-04 15:00:02 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2014-12-10 11:33:38 +0300
commit9be71be5bda27b068176ab9b982cf3d7d41a4acd (patch)
tree660bfb98cf297b7be821eb43b98f7fc7a1dcdcc4 /util
parent44c2286b5df1f50fc9fedabd7b1a5a8022e583fc (diff)
util: Fuse g_malloc(); memset() into g_new0()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'util')
-rw-r--r--util/uri.c3
1 files changed, 1 insertions, 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);
}