From patchwork Thu Oct 8 19:35:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 528061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:4830:134:3::10]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 094C61400CB for ; Fri, 9 Oct 2015 12:42:33 +1100 (AEDT) Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkH3a-0000bw-Jy for incoming@patchwork.ozlabs.org; Thu, 08 Oct 2015 15:41:56 -0400 Received: from lists.gnu.org ([2001:4830:134:3::11]:33562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkH3X-0000Tc-Au for incoming@patchwork.ozlabs.org; Thu, 08 Oct 2015 15:40:47 -0400 Received: from localhost ([::1]:36783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkH3W-0000RQ-2c for incoming@patchwork.ozlabs.org; Thu, 08 Oct 2015 15:40:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkGyU-0004cH-2j for qemu-devel@nongnu.org; Thu, 08 Oct 2015 15:35:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkGyS-0006IQ-Ca for qemu-devel@nongnu.org; Thu, 08 Oct 2015 15:35:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkGyS-0006IC-54; Thu, 08 Oct 2015 15:35:32 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id DADC9368E3; Thu, 8 Oct 2015 19:35:31 +0000 (UTC) Received: from thh440s.redhat.com (vpn1-6-90.ams2.redhat.com [10.36.6.90]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t98JZH3L009701; Thu, 8 Oct 2015 15:35:29 -0400 From: Thomas Huth To: qemu-devel@nongnu.org Date: Thu, 8 Oct 2015 21:35:15 +0200 Message-Id: <1444332916-16476-5-git-send-email-thuth@redhat.com> In-Reply-To: <1444332916-16476-1-git-send-email-thuth@redhat.com> References: <1444332916-16476-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x Cc: qemu-trivial@nongnu.org, Laszlo Ersek Subject: [Qemu-devel] [PATCH 4/5] tests/i44fx-test: No need for zeroing memory before memset X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 Change a g_malloc0 into g_malloc since the following memset fills the whole buffer anyway. Cc: Laszlo Ersek Signed-off-by: Thomas Huth Reviewed-by: Laszlo Ersek --- tests/i440fx-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c index d0bc8de..7fa1709 100644 --- a/tests/i440fx-test.c +++ b/tests/i440fx-test.c @@ -191,7 +191,7 @@ static void write_area(uint32_t start, uint32_t end, uint8_t value) uint32_t size = end - start + 1; uint8_t *data; - data = g_malloc0(size); + data = g_malloc(size); memset(data, value, size); memwrite(start, data, size);