On Wed, Apr 25, 2012 at 08:01:57PM -0700, Chase Douglas wrote: > On 04/25/2012 07:56 PM, Peter Hutterer wrote: > > 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. > > Ok. Is this an actual bug fix then? my impression when I read it was > that this just made the code make more sense to read.
The first hunk of http://patchwork.freedesktop.org/patch/10055/ has the same effect in terms of fixing the suspend bug. I just want this one in for consistency. Cheers, Peter _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
