[PATCH 2/3] xfree86: vgaarb: rework wrapping function

Tiago Vignatti tiago.vignatti at nokia.com
Fri Sep 11 09:20:51 PDT 2009


On Fri, Sep 11, 2009 at 01:45:18PM +0200, ext Mark Marshall wrote:
> Dave Airlie wrote:
> > On Thu, 2009-09-10 at 17:52 +0300, Tiago Vignatti wrote:
> >> No semantical changes.
> > 
> > except you changed > 1 to < 2 any reason for that? seems pointless.
> I think the patch is correct:
> 	x > 1 === !(x < 2)
> 

Exactly. The patch is logically equivalent. See.

    if (vga_count > 1 && xf86Screens) {

        LOT OF CODE

    }

and:

    if (vga_count < 2 || !xf86Screens)
        return FALSE;

    LOT OF CODE


I've done it to use one degree less of "if" chain :) 


            Tiago


More information about the xorg-devel mailing list