On Sat, Jul 27, 2013 at 11:27:59AM +0200, walter harms wrote:
> > +#define WS_XT_MAP_SIZE (sizeof(wsXtMap)/sizeof(unsigned char))
> > +
>
> I would be careful here, the type is CARD8, that may be or not
> size of unsigned char. I prefer using *wsXtMap or wsXtMap[0]
> that circumvents the problem very nicely.

I just followed the other examples in the file:
#define WS_USB_MAP_SIZE (sizeof(wsUsbMap)/sizeof(unsigned char))
#define WS_XT_MAP_SIZE (sizeof(wsXtMap)/sizeof(unsigned char))
#define WS_ADB_MAP_SIZE (sizeof(wsAdbMap)/sizeof(unsigned char))
#define WS_LK201_MAP_SIZE (sizeof(wsLk201Map)/sizeof(unsigned char))
#define WS_SUN_MAP_SIZE (sizeof(wsSunMap)/sizeof(unsigned char))

I agree your suggestion is more stable, if something changes.

Should I change them all to use sizeof(*wsFOOMap) instead?
 Thomas
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to