qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/scsi-bus.c: Fix use of uninitialised variable
@ 2011-08-12 16:49 Peter Maydell
  2011-08-12 19:22 ` Blue Swirl
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Peter Maydell @ 2011-08-12 16:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, patches

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>
---
 hw/scsi-bus.c |    2 +-
 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);
         }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-14 20:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-12 16:49 [Qemu-devel] [PATCH] hw/scsi-bus.c: Fix use of uninitialised variable Peter Maydell
2011-08-12 19:22 ` Blue Swirl
2011-08-13 17:29   ` Blue Swirl
2011-08-14 17:32     ` Paolo Bonzini
2011-08-14 18:03 ` Paolo Bonzini
2011-08-14 20:00 ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).