On Wed, Apr 25, 2012 at 06:22:07PM -0700, Chase Douglas wrote: > On 04/25/2012 05:36 PM, Peter Hutterer wrote: > > We implicitly rely on this already since we calloc the struct. Do it > > expliclity on DeviceOn(). > > > > Signed-off-by: Peter Hutterer <[email protected]> > > --- > > This half of the fix to 49161 a bit redundant but better safe than sorry, > > they say. > > I have not problems with it, but this is basically how things are done > all over the X stack. It's assumed structs are calloc'd where it isn't > obvious pretty much. Does this mean we have to take up arms against all > uninitialized members? :)
in this case the struct alloc is only called once (DEVICE_INIT) but the struct is re-used for each DeviceOn(). So forcing it to known zero before it's being used seems sensible. > Reviewed-by: Chase Douglas <[email protected]> thanks. Cheers, Peter _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
