From 5c5dafdc5ecb2fd5080189e9ea4adcfa4e03ad5d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 12 Jun 2009 09:50:18 +0200 Subject: 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 9a0c0674fc..5d33559966 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); -- cgit v1.2.3