From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH 2/3] Fuse g_malloc(); memset() into g_new0()
Date: Thu, 4 Dec 2014 15:00:02 +0100 [thread overview]
Message-ID: <1417701603-26388-3-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1417701603-26388-1-git-send-email-armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
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.9.3
next prev parent reply other threads:[~2014-12-04 14:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 14:00 [Qemu-devel] [PATCH 0/3] util: Trivial cleanups around g_malloc() Markus Armbruster
2014-12-04 14:00 ` [Qemu-devel] [PATCH 1/3] util: Drop superfluous conditionals around g_free() Markus Armbruster
2014-12-04 14:00 ` Markus Armbruster [this message]
2014-12-04 14:04 ` [Qemu-devel] [PATCH 2/3] Fuse g_malloc(); memset() into g_new0() Markus Armbruster
2014-12-04 14:00 ` [Qemu-devel] [PATCH 3/3] util: Use g_new() & friends where that makes obvious sense Markus Armbruster
2014-12-04 22:51 ` [Qemu-devel] [PATCH 0/3] util: Trivial cleanups around g_malloc() Eric Blake
2014-12-05 6:54 ` Fam Zheng
2014-12-10 8:34 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417701603-26388-3-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).