From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2KAs-0006ry-03 for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2KAd-0003zE-DC for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2KAd-0003yi-5q for qemu-devel@nongnu.org; Tue, 28 Feb 2012 05:20:35 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1SAKXom004932 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 28 Feb 2012 05:20:33 -0500 From: Gerd Hoffmann Date: Tue, 28 Feb 2012 11:20:12 +0100 Message-Id: <1330424430-23015-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1330424430-23015-1-git-send-email-kraxel@redhat.com> References: <1330424430-23015-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 03/21] usb-uhci: cleanup UHCIAsync allocation & initialization. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/usb-uhci.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 2280dc7..ca87290 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -159,15 +159,9 @@ typedef struct UHCI_QH { static UHCIAsync *uhci_async_alloc(UHCIState *s) { - UHCIAsync *async = g_malloc(sizeof(UHCIAsync)); + UHCIAsync *async = g_new0(UHCIAsync, 1); - memset(&async->packet, 0, sizeof(async->packet)); async->uhci = s; - async->valid = 0; - async->td = 0; - async->token = 0; - async->done = 0; - async->isoc = 0; usb_packet_init(&async->packet); pci_dma_sglist_init(&async->sgl, &s->dev, 1); -- 1.7.1