From: Gerd Hoffmann Date: Fri, 12 Jun 2009 07:50:18 +0000 (+0200) Subject: virtio blk: fix warning. X-Git-Tag: TizenStudio_2.0_p2.3~8650 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78235eba4e09001b64b5d6563f2862d387580997;p=sdk%2Femulator%2Fqemu.git virtio blk: fix warning. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- 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);