From: Markus Armbruster Date: Wed, 28 Jan 2015 14:54:01 +0000 (+0100) Subject: qemu-option: Replace pointless use of g_malloc0() by g_malloc() X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~350^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96c044afdf600e9418b3e509e60ef51a841eed20;p=sdk%2Femulator%2Fqemu.git 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 Reviewed-by: Gonglei Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- diff --git a/util/qemu-option.c b/util/qemu-option.c index a708241..c779150 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;