From 4d22aa06fd2b53e11233ebd3a25045cd96bf67ab Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 8 Oct 2010 19:22:29 +0200 Subject: [PATCH] Fix 64bit arch issue in synaptics eventcomm.c In C, "1" is an integer, not an unsigned long. Thus (1 << 33) doesn't give you the 33th bit shift, but it's undefined. Signed-off-by: Takashi Iwai Signed-off-by: Peter Hutterer --- src/eventcomm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eventcomm.c b/src/eventcomm.c index 85dfd09..4593bba 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -49,7 +49,7 @@ #define NBITS(x) (((x) + LONG_BITS - 1) / LONG_BITS) #define OFF(x) ((x) % LONG_BITS) #define LONG(x) ((x) / LONG_BITS) -#define TEST_BIT(bit, array) (array[LONG(bit)] & (1 << OFF(bit))) +#define TEST_BIT(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) /***************************************************************************** * Function Definitions