]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
bitops: fix BIT_MASK()
authorJaroslav Kysela <perex@perex.cz>
Thu, 22 Feb 2018 15:18:25 +0000 (16:18 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 22 Feb 2018 15:18:25 +0000 (16:18 +0100)
src/bitops.h

index d1b669b4bcb3f58d5b7fc861f17d3fe49a1cb961..2a55f9076dc8974ef60ba07c1fb6b09a690eb35e 100644 (file)
@@ -29,7 +29,7 @@ typedef uint32_t bitops_ulong_t;
 #endif
 
 #define BIT_WORD(bit) ((bit) / BITS_PER_LONG)
-#define BIT_MASK(bit) (1UL << ((bit) % BITS_PER_LONG))
+#define BIT_MASK(bit) (((bitops_ulong_t)1) << ((bit) % BITS_PER_LONG))
 
 static inline void set_bit(int bit, void *addr)
 {