[PATCH 1/2] input: allow NULL as XkbRMVLOSet in InitKeyboardDeviceStruct.

Alan Coopersmith Alan.Coopersmith at Sun.COM
Wed Apr 15 08:17:32 PDT 2009


Looks mostly good to me - one concern though:

Peter Hutterer wrote:

> --- a/xkb/xkbInit.c
> +++ b/xkb/xkbInit.c
> @@ -474,10 +474,18 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
>      XkbSrvLedInfoPtr sli;
>      XkbChangesRec changes;
>      XkbEventCauseRec cause;
> +    XkbRMLVOSet rmlvo_dflts = { NULL };

Won't that just initialize the first field to NULL and leave the rest set to
whatever was on the stack?   I guess it won't matter since XkbGetRulesDflts
will forcibly overwrite all 5 fields, so it's just inconsistent and confusing
to the programmer, not a bug.

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering



More information about the xorg-devel mailing list