From 78235eba4e09001b64b5d6563f2862d387580997 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 12 Jun 2009 09:50:18 +0200 Subject: [PATCH] virtio blk: fix warning. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- hw/virtio-blk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 9a0c067..5d33559 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); -- 2.7.4