[PATCH 2/6] XKB: Simplify a loop in ProcXkbGetKbdByName

Daniel Stone daniel at fooishbar.org
Mon May 9 17:02:12 PDT 2011


Hi,

On Mon, May 09, 2011 at 06:34:09PM +0200, Cyril Brulebois wrote:
> Sorry I'm late but:
> 
> Daniel Stone <daniel at fooishbar.org> (05/05/2011):
> > Replace:
> >     for (stuff; things; etc) {
> >         if (misc || other) {
> >             [...]
> >         }
> >     }
> > with:
> >     for (stuff; things; etc) {
> >         if (!misc && !other)
> >             continue;
> >         [...]
> >     }
> 
> that says nothing about that:
> 
> > -            if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) {
> > +            if (tmpd != dev && GetMaster(tmpd, MASTER_KEYBOARD) != dev)
> 
> You're losing one part here; was that on purpose?

Yes.  I could probably call it out in the commit message if that would
help?

Cheers,
Daniel


More information about the xorg-devel mailing list