[PATCH xserver] Autoconfig: Fix the loop adding dectected drivers to the list of screens

Matthieu Herrb matthieu at herrb.eu
Sun Jul 31 10:05:11 UTC 2016


On Sat, Jul 30, 2016 at 03:39:41PM -0700, Keith Packard wrote:
> Matthieu Herrb <matthieu at herrb.eu> writes:
> 
> > @@ -389,8 +389,7 @@ autoConfigDevice(GDevPtr preconf_device)
> >  
> >              /* for each other driver found, copy the first screen, insert it
> >               * into the list of screens and set the driver */
> > -            i = 0;
> > -            while (i++ < num_matches) {
> > +	    for (i = 0; i < num_matches; i++) {
> 
> Looks like the old loop started copying at 1, and just went one screen
> too far. Should this be:
> 
> 	    for (i = 1; i < num_matches; i++) {
> 

Hmm yes. after looking at the code once more, I think you're right.

-- 
Matthieu Herrb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160731/0c763e49/attachment.sig>


More information about the xorg-devel mailing list