XKB: Sanitise ctrls action

Turn four unsigned chars into one unsigned long.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Daniel Stone 2008-04-25 19:52:11 +03:00
commit b5f49382fe
4 changed files with 7 additions and 19 deletions

View file

@ -180,20 +180,8 @@ typedef struct _XkbSwitchScreenAction {
typedef struct _XkbCtrlsAction {
unsigned char type;
unsigned char flags;
/* FIXME: Make this an int. */
unsigned char ctrls3;
unsigned char ctrls2;
unsigned char ctrls1;
unsigned char ctrls0;
unsigned long ctrls;
} XkbCtrlsAction;
#define XkbActionSetCtrls(a, c) ((a)->ctrls3 = ((c) >> 24) & 0xff, \
(a)->ctrls2 = ((c) >> 16) & 0xff, \
(a)->ctrls1 = ((c) >> 8) & 0xff, \
(a)->ctrls0 = (c) & 0xff)
#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
(((unsigned int)(a)->ctrls2)<<16)|\
(((unsigned int)(a)->ctrls1)<<8)|\
((unsigned int) (a)->ctrls0))
typedef struct _XkbMessageAction {
unsigned char type;