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-11-23 13:47:30 +1000
commit4d22aa06fd2b53e11233ebd3a25045cd96bf67ab (patch)
tree918b94feb8c18fefb95f1551573ee277c9e5eee2
parent57193777374dd10a920171670a06b7e79d389703 (diff)
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 <tiwai@suse.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/eventcomm.c2
1 files changed, 1 insertions, 1 deletions
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