summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-25 15:43:38 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-11-04 07:47:47 +1000
commiteede8ccffc1a831f4de89403edc8dffd52494e8b (patch)
tree0de2f0d7b08cf259d90288f6c75fa6415ea3f13e
parent2aba790ed3acc3ece5e56dac088e0a0a4a04b45d (diff)
Don't crop long value from EvdevBitIsSet.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--src/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index f99e0d5..028a9e1 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -176,7 +176,7 @@ static size_t EvdevCountBits(unsigned long *array, size_t nlongs)
static inline int EvdevBitIsSet(const unsigned long *array, int bit)
{
- return array[bit / LONG_BITS] & (1LL << (bit % LONG_BITS));
+ return !!(array[bit / LONG_BITS] & (1LL << (bit % LONG_BITS)));
}
static inline void EvdevSetBit(unsigned long *array, int bit)