aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-bus.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-08-12 17:49:36 +0100
committerBlue Swirl <blauwirbel@gmail.com>2011-08-14 19:34:25 +0000
commit3b6ffe50300f13240e1b46420ad05da1116df410 (patch)
treeccb35ff37631ecef6ce2b2dab340f1e075c31bbb /hw/scsi-bus.c
parent7534ba0130a29a3373ed10557e2c64452b75ba8a (diff)
downloadqemu-3b6ffe50300f13240e1b46420ad05da1116df410.zip
qemu-3b6ffe50300f13240e1b46420ad05da1116df410.tar.gz
qemu-3b6ffe50300f13240e1b46420ad05da1116df410.tar.bz2
hw/scsi-bus.c: Fix use of uninitialised variable
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 <peter.maydell@linaro.org> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r--hw/scsi-bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index f2af6cd..559d5a4 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -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);
}