diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-10 20:37:51 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-10 20:37:51 +0300 |
| commit | 4c6be9cb63ff66ce49a6f733c1e00d1889f2c95f (patch) | |
| tree | 898854069101e6616620e2bd732a48e5eca08fd2 /include/apos/bits.h | |
| parent | 8aa17b12f29536ea9c8b6ca22c7f153e8d90fa3b (diff) | |
| download | kmi-4c6be9cb63ff66ce49a6f733c1e00d1889f2c95f.tar.gz kmi-4c6be9cb63ff66ce49a6f733c1e00d1889f2c95f.zip | |
add basic ubsan and fix issues reported by it
Diffstat (limited to 'include/apos/bits.h')
| -rw-r--r-- | include/apos/bits.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/apos/bits.h b/include/apos/bits.h index cc3cd00..699cba4 100644 --- a/include/apos/bits.h +++ b/include/apos/bits.h @@ -8,9 +8,9 @@ #define __set_bit(x, y) ((x) |= (y)) #define __clear_bit(x, y) ((x) &= ~(y)) -#define __is_nset(x, y) (__is_set((x), 1 << (y))) -#define __set_nbit(x, y) (__set_bit((x), 1 << (y))) -#define __clear_nbit(x, y) (__clear_bit((x), 1 << (y))) +#define __is_nset(x, y) (__is_set((x), 1UL << (y))) +#define __set_nbit(x, y) (__set_bit((x), 1UL << (y))) +#define __clear_nbit(x, y) (__clear_bit((x), 1UL << (y))) uint16_t __bswap16(uint16_t u); uint32_t __bswap32(uint32_t u); |
