summary refs log tree commit diff stats
path: root/util/qemu-option.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-01-28 15:54:01 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2015-02-10 09:27:20 +0300
commit96c044afdf600e9418b3e509e60ef51a841eed20 (patch)
tree5edde5037bc46994894d110d1d64e1b6d7f324bb /util/qemu-option.c
parentb41112c46b93f781669c0eb89e51d3a87af6bb49 (diff)
downloadfocaccia-qemu-96c044afdf600e9418b3e509e60ef51a841eed20.tar.gz
focaccia-qemu-96c044afdf600e9418b3e509e60ef51a841eed20.zip
qemu-option: Replace pointless use of g_malloc0() by g_malloc()
get_opt_value() takes a write-only buffer, so zeroing it is pointless.
We don't do it elsewhere, either.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'util/qemu-option.c')
-rw-r--r--util/qemu-option.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/qemu-option.c b/util/qemu-option.c
index a708241643..c779150808 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -213,7 +213,7 @@ void parse_option_size(const char *name, const char *value,
 bool has_help_option(const char *param)
 {
     size_t buflen = strlen(param) + 1;
-    char *buf = g_malloc0(buflen);
+    char *buf = g_malloc(buflen);
     const char *p = param;
     bool result = false;
 
@@ -237,7 +237,7 @@ out:
 bool is_valid_option_list(const char *param)
 {
     size_t buflen = strlen(param) + 1;
-    char *buf = g_malloc0(buflen);
+    char *buf = g_malloc(buflen);
     const char *p = param;
     bool result = true;