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

Alan Coopersmith Alan.Coopersmith at Sun.COM
Wed Apr 15 17:10:02 PDT 2009


Alan Coopersmith wrote:
> Looks mostly good to me - one concern though:
>> +    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? 

Never mind, while I could swear that unspecified members were undefined,
apparently ANSI C89 specifies that if you have a struct initializer, all
fields not initialized are "initialized implicitly the same as objects
that have static storage duration" (i.e. zero/NULL filled).

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



More information about the xorg-devel mailing list