]> Git Repo - qemu.git/commitdiff
hw/scsi-bus.c: Fix use of uninitialised variable
authorPeter Maydell <[email protected]>
Fri, 12 Aug 2011 16:49:36 +0000 (17:49 +0100)
committerBlue Swirl <[email protected]>
Sun, 14 Aug 2011 19:34:25 +0000 (19:34 +0000)
Don't use req before it has been initialised in scsi_req_new().
This fixes a compile failure due to gcc complaining about this.

Signed-off-by: Peter Maydell <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
hw/scsi-bus.c

index f2af6cdb4ddcf44ff14635f4a568127e424baf2e..559d5a47088f6ddc638baba150939ec856a54b3f 100644 (file)
@@ -372,7 +372,7 @@ SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun,
     } else {
         trace_scsi_req_parsed(d->id, lun, tag, buf[0],
                               cmd.mode, cmd.xfer);
-        if (req->cmd.lba != -1) {
+        if (cmd.lba != -1) {
             trace_scsi_req_parsed_lba(d->id, lun, tag, buf[0],
                                       cmd.lba);
         }
This page took 0.029266 seconds and 4 git commands to generate.