From: malc <av1474@comtv.ru>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] pci: rewrite devaddr parsing
Date: Fri, 17 Feb 2012 13:50:41 +0400 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.00.1202171348510.6392@linmac> (raw)
In-Reply-To: <20120217094255.GA31366@redhat.com>
On Fri, 17 Feb 2012, Michael S. Tsirkin wrote:
> On Thu, Feb 16, 2012 at 11:23:40PM +0400, malc wrote:
> > > +{
> > > + unsigned dom, bus, slot, func;
> > > + int n = -1;
> > > +
> > > + /* Parse [[<domain>:]<bus>:]<slot> */
> > > + sscanf(addr, "%x:%x:%x%n", &dom, &bus, &slot, &n);
> >
> > sscanf can fail.
> >
> > > + if (n == -1) {
>
>
> If it does n will stay -1.
>
You are right. That does not, however, invalidate the points made
by Eric Blake.
--
mailto:av1474@comtv.ru
next prev parent reply other threads:[~2012-02-17 9:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 18:15 [Qemu-devel] [PATCH 0/2] pci devaddr parsing cleanups Michael S. Tsirkin
2012-02-16 18:15 ` [Qemu-devel] [PATCH 1/2] pci: don't export an internal function Michael S. Tsirkin
2012-02-16 18:15 ` [Qemu-devel] [PATCH 2/2] pci: rewrite devaddr parsing Michael S. Tsirkin
2012-02-16 19:23 ` malc
2012-02-16 20:39 ` Eric Blake
2012-02-16 21:35 ` malc
2012-02-17 10:08 ` Michael S. Tsirkin
2012-02-17 12:35 ` Markus Armbruster
2012-02-19 16:10 ` Michael S. Tsirkin
2012-02-19 20:03 ` Michael S. Tsirkin
2012-02-17 9:42 ` Michael S. Tsirkin
2012-02-17 9:50 ` malc [this message]
2012-02-17 10:13 ` Michael S. Tsirkin
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=alpine.LNX.2.00.1202171348510.6392@linmac \
--to=av1474@comtv.ru \
--cc=mst@redhat.com \
--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).