diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-06-12 09:50:18 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-16 15:18:39 -0500 |
commit | 78235eba4e09001b64b5d6563f2862d387580997 (patch) | |
tree | 75f5c7ba14be5d721f066cc89966954c3bd33447 | |
parent | 4ceb182ca405c3b45047f8f134897f8a50058a4b (diff) | |
download | qemu-78235eba4e09001b64b5d6563f2862d387580997.tar.gz qemu-78235eba4e09001b64b5d6563f2862d387580997.tar.bz2 qemu-78235eba4e09001b64b5d6563f2862d387580997.zip |
virtio blk: fix warning.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | 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 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); |