qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] pci: rewrite devaddr parsing


From: malc
Subject: Re: [Qemu-devel] [PATCH 2/2] pci: rewrite devaddr parsing
Date: Fri, 17 Feb 2012 13:50:41 +0400 (MSK)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

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:address@hidden



reply via email to

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