qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/scsi-bus.c: Fix use of uninitialised variabl


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH] hw/scsi-bus.c: Fix use of uninitialised variable
Date: Sun, 14 Aug 2011 20:00:13 +0000

Thanks, applied.

On Fri, Aug 12, 2011 at 4:49 PM, Peter Maydell <address@hidden> 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 <address@hidden>
> ---
>  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
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]