From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MF1X2-0003Cr-3l for qemu-devel@nongnu.org; Fri, 12 Jun 2009 03:50:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MF1Wx-00034p-EX for qemu-devel@nongnu.org; Fri, 12 Jun 2009 03:50:35 -0400 Received: from [199.232.76.173] (port=36038 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MF1Wx-00034j-1a for qemu-devel@nongnu.org; Fri, 12 Jun 2009 03:50:31 -0400 Received: from mx2.redhat.com ([66.187.237.31]:38428) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MF1Ww-000392-E9 for qemu-devel@nongnu.org; Fri, 12 Jun 2009 03:50:30 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5C7oT4O030305 for ; Fri, 12 Jun 2009 03:50:29 -0400 From: Gerd Hoffmann Date: Fri, 12 Jun 2009 09:50:18 +0200 Message-Id: <1244793018-16998-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] virtio blk: fix warning. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/virtio-blk.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 8dd3c7a..bb8e23a 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -294,6 +294,7 @@ static void virtio_blk_update_config(VirtIODevice *vdev, uint8_t *config) bdrv_get_geometry(s->bs, &capacity); bdrv_get_geometry_hint(s->bs, &cylinders, &heads, &secs); + memset(&blkcfg, 0, sizeof(blkcfg)); stq_raw(&blkcfg.capacity, capacity); stl_raw(&blkcfg.seg_max, 128 - 2); stw_raw(&blkcfg.cylinders, cylinders); -- 1.6.2.2