From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGU0W-0007kY-G7 for qemu-devel@nongnu.org; Wed, 28 Jan 2015 09:54:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGU0P-0006Gn-Cg for qemu-devel@nongnu.org; Wed, 28 Jan 2015 09:54:16 -0500 From: Markus Armbruster Date: Wed, 28 Jan 2015 15:54:01 +0100 Message-Id: <1422456844-13043-2-git-send-email-armbru@redhat.com> In-Reply-To: <1422456844-13043-1-git-send-email-armbru@redhat.com> References: <1422456844-13043-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 1/4] qemu-option: Replace pointless use of g_malloc0() by g_malloc() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org 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 --- util/qemu-option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 1.9.3