hw/nvme: fix missing variable initializers
commit5f4884c4412318a1adc105dea9cc28f7625ce730
authorKlaus Jensen <k.jensen@samsung.com>
Mon, 9 Aug 2021 10:34:40 +0000 (9 12:34 +0200)
committerKlaus Jensen <k.jensen@samsung.com>
Mon, 9 Aug 2021 10:52:16 +0000 (9 12:52 +0200)
tree85caaa206cf09b9d9b3a750c901e1fca0563a47f
parentdee64246ded3aa7dbada68b96ce1c64e5bea327d
hw/nvme: fix missing variable initializers

Coverity found that 'uuid', 'csi' and 'eui64' are uninitialized. While
we set most of the fields, we do not explicitly set the rsvd2 field in
the NvmeIdNsDescr header.

Fix this by explicitly zero-initializing the variables.

Reported-by: Coverity (CID 1458835, 1459295 and 1459580)
Fixes: 6870cfb8140d ("hw/nvme: namespace parameter for EUI-64")
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/nvme/ctrl.c