[PATCH xserver 1/3] xfree86: Silence always true condition warning.

Michal Srb msrb at suse.com
Mon Mar 27 12:16:53 UTC 2017


On Monday, 27 March 2017 14:08:52 EEST walter harms wrote:
> > -    if (pVideo->bus < 256)
> > -        snprintf(busnum, sizeof(busnum), "%d", pVideo->bus);
> > -    else
> > -        snprintf(busnum, sizeof(busnum), "%d@%d",
> > -                 pVideo->bus & 0x00ff, pVideo->bus >> 8);
> > +    snprintf(busnum, sizeof(busnum), "%d", pVideo->bus);
> > 
> >      XNFasprintf(&tmp, "PCI:%s:%d:%d",
> >      
> >                  busnum, pVideo->dev, pVideo->func);
> 
> is busnum used later ? otherwise you could use the XNFasprintf().

It is not used later. You are right, that would be even better. Going to make 
that.

Michal


More information about the xorg-devel mailing list