]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
libqos/ahci: Zero-fill AHCI headers
authorJohn Snow <jsnow@redhat.com>
Wed, 25 Feb 2015 23:06:35 +0000 (18:06 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 10 Mar 2015 13:02:23 +0000 (14:02 +0100)
Even though it's just the reserved space, make sure they're zeroes.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1424905602-24715-2-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/libqos/ahci.c

index a6105c750fe79fd3bd1c48b6680f86d8f969dce7..9dc505ce0a645c17665c0f6e37ed3a2fda8ca54b 100644 (file)
@@ -487,7 +487,7 @@ void ahci_get_command_header(AHCIQState *ahci, uint8_t port,
 void ahci_set_command_header(AHCIQState *ahci, uint8_t port,
                              uint8_t slot, AHCICommandHeader *cmd)
 {
-    AHCICommandHeader tmp;
+    AHCICommandHeader tmp = { .flags = 0 };
     uint64_t ba = ahci->port[port].clb;
     ba += slot * sizeof(AHCICommandHeader);