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>
This commit is contained in:
Peter Hutterer
2011-10-25 15:43:38 +10:00
parent 2aba790ed3
commit eede8ccffc

View File

@@ -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)