qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: jim@meyering.net
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Anthony Liguori" <aliguori@us.ibm.com>,
	"Stefan Hajnoczi" <stefanha@linux.vnet.ibm.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jim Meyering" <meyering@redhat.com>,
	qemu-devel@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Avi Kivity" <avi@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Floris Bos" <dev@noc-ps.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 2/3] scsi, pci, qdev, isa-bus, sysbus: don't let *_get_fw_dev_path return NULL
Date: Tue, 15 May 2012 15:13:15 +0200	[thread overview]
Message-ID: <4FB2566B.4080708@redhat.com> (raw)
In-Reply-To: <1337087078-24056-3-git-send-email-jim@meyering.net>

Il 15/05/2012 15:04, jim@meyering.net ha scritto:
> diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
> index 8ab9bcd..a4e93d1 100644
> --- a/hw/scsi-bus.c
> +++ b/hw/scsi-bus.c
> @@ -1470,12 +1470,8 @@ static char *scsibus_get_dev_path(DeviceState *dev)
>  static char *scsibus_get_fw_dev_path(DeviceState *dev)
>  {
>      SCSIDevice *d = SCSI_DEVICE(dev);
> -    char path[100];
> -
> -    snprintf(path, sizeof(path), "channel@%x/%s@%x,%x", d->channel,
> -             qdev_fw_name(dev), d->id, d->lun);
> -
> -    return strdup(path);
> +    return g_strdup_printf("channel@%x/%s@%x,%x", d->channel,
> +                           qdev_fw_name(dev), d->id, d->lun);
>  }
> 
>  SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int id, int lun)

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

I'm assuming that these will be handled by a global committer.

Paolo

  reply	other threads:[~2012-05-15 13:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15 13:04 [Qemu-devel] [PATCH 0/3] unchecked uses of strdup jim
2012-05-15 13:04 ` [Qemu-devel] [PATCH 1/3] envlist.c: handle strdup failure jim
2012-05-19 15:55   ` Blue Swirl
2012-05-21 10:25     ` Jim Meyering
2012-05-21 17:56       ` Blue Swirl
2012-05-22  8:23         ` Kevin Wolf
2012-05-22  9:05           ` Jim Meyering
2012-05-22  9:34             ` Kevin Wolf
2012-05-22  9:50               ` Jim Meyering
2012-05-15 13:04 ` [Qemu-devel] [PATCH 2/3] scsi, pci, qdev, isa-bus, sysbus: don't let *_get_fw_dev_path return NULL jim
2012-05-15 13:13   ` Paolo Bonzini [this message]
2012-05-15 13:35   ` Kevin Wolf
2012-05-15 13:04 ` [Qemu-devel] [PATCH 3/3] sparc: use g_strdup in place of unchecked strdup jim

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=4FB2566B.4080708@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=dev@noc-ps.com \
    --cc=hpoussin@reactos.org \
    --cc=jim@meyering.net \
    --cc=kwolf@redhat.com \
    --cc=meyering@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@linux.vnet.ibm.com \
    /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).