From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/scsi-bus.c: Fix use of uninitialised variable
Date: Sun, 14 Aug 2011 20:03:25 +0200 [thread overview]
Message-ID: <4E480DED.2@redhat.com> (raw)
In-Reply-To: <1313167776-27926-1-git-send-email-peter.maydell@linaro.org>
On 08/12/2011 06:49 PM, Peter Maydell wrote:
> 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);
> }
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
next prev parent reply other threads:[~2011-08-14 18:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2011-08-14 20:00 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E480DED.2@redhat.com \
--to=pbonzini@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).