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>
This commit is contained in:
Markus Armbruster 2015-01-28 15:54:01 +01:00 committed by Michael Tokarev
parent b41112c46b
commit 96c044afdf
1 changed files with 2 additions and 2 deletions

View File

@ -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;