[PATCH 28/32] [libx11] Comparing array against NULL is not useful "&xkb->server->vmods != NULL"

Dirk Wallenstein halsmit at t-online.de
Thu Jan 27 04:25:29 PST 2011


On Thu, Jan 27, 2011 at 10:50:19AM +0100, walter harms wrote:
> 
> 
> Am 27.01.2011 08:54, schrieb Erkki Seppälä:
> > Removed superfluous comparison.
> > 
> > Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
> > ---
> >  src/xkb/XKBMisc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/src/xkb/XKBMisc.c b/src/xkb/XKBMisc.c
> > index fc5ae5f..4aa1f73 100644
> > --- a/src/xkb/XKBMisc.c
> > +++ b/src/xkb/XKBMisc.c
> > @@ -619,7 +619,7 @@ KeySym *	syms;
> >  	XkbApplyCompatMapToKey(xkb,key,changes);
> >      }
> >  
> > -    if ((xkb->server->vmods!=NULL)&&(xkb->map->modmap!=NULL)&&(changes)&&
> > +    if ((xkb->map->modmap!=NULL)&&(changes)&&
> >  	(changes->map.changed&(XkbVirtualModMapMask|XkbModifierMapMask))) {
> >  	unsigned char		newVMods[XkbNumVirtualMods];
> >  	register  unsigned 	bit,i;
> 
> 
> I am not an expert on X11 coding style: but could someone detangle the if() here ?
> something like:

XKB character blobs.  Famous.  Restyled or not, it's an array:

Reviewed-by: Dirk Wallenstein <halsmit at t-online.de>

-- 
Greetings,
Dirk


More information about the xorg-devel mailing list