mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 13:50:16 +01:00
util: change the bit to shift to ULL
libevdev/libevdev-util.h:45:45: runtime error: left shift of 1 by 63 places cannot be represented in type 'long long' Fixes: #32 Part-of: <https://gitlab.freedesktop.org/libevdev/libevdev/-/merge_requests/127>
This commit is contained in:
parent
d093b4752a
commit
a30a461e82
1 changed files with 3 additions and 3 deletions
|
|
@ -42,19 +42,19 @@ startswith(const char *str, size_t len, const char *prefix, size_t plen)
|
||||||
static inline int
|
static inline int
|
||||||
bit_is_set(const unsigned long *array, int bit)
|
bit_is_set(const unsigned long *array, int bit)
|
||||||
{
|
{
|
||||||
return !!(array[bit / LONG_BITS] & (1LL << (bit % LONG_BITS)));
|
return !!(array[bit / LONG_BITS] & (1ULL << (bit % LONG_BITS)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
set_bit(unsigned long *array, int bit)
|
set_bit(unsigned long *array, int bit)
|
||||||
{
|
{
|
||||||
array[bit / LONG_BITS] |= (1LL << (bit % LONG_BITS));
|
array[bit / LONG_BITS] |= (1ULL << (bit % LONG_BITS));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
clear_bit(unsigned long *array, int bit)
|
clear_bit(unsigned long *array, int bit)
|
||||||
{
|
{
|
||||||
array[bit / LONG_BITS] &= ~(1LL << (bit % LONG_BITS));
|
array[bit / LONG_BITS] &= ~(1ULL << (bit % LONG_BITS));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue