summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-10-08 19:22:29 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2010-12-01 09:12:49 +1000
commita29f55ab47e1df8f73e9bd5015c129478dd5b662 (patch)
tree6ec019c067f0342bce50afc3322db7bd857d3f6e
parent1251ca15b644854a68aaa7d2046ae50fee3334a7 (diff)
Fix 64bit arch issue in synaptics eventcomm.csynaptics-1.3-branch
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 <tiwai@suse.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 4d22aa06fd2b53e11233ebd3a25045cd96bf67ab)
-rw-r--r--src/eventcomm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index faa66ab..d816614 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