[PATCH] Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119)

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 13 19:31:00 PDT 2011


On Tue, Apr 12, 2011 at 09:58:57AM +0100, Daniel Stone wrote:
> Hi,
> 
> On Tue, Apr 12, 2011 at 11:05:56AM +1000, Peter Hutterer wrote:
> > +    /* force alignment with double */
> > +    union align_u { ValuatorClassRec valc; double d; } *align;
> 
> Errr ... why not just allocate valc->axes separately from valc?

mostly because this is the second half to Keith's patch
678f5396c91b3d0c7572ed579b0a4fb62b2b4655 and I'd rather have this in one
location before I start changing the layout again. I don't know how many
other places there are that rely on this to be one memory block.

It's a quickfix for a specific issue that'll hopefully become obsolete with
the next input ABI.

Cheers,
  Peter


More information about the xorg-devel mailing list