Make BIT() unsigned int instead of int
authorJouni Malinen <j@w1.fi>
Tue, 7 Jul 2015 09:33:03 +0000 (12:33 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 7 Jul 2015 13:25:06 +0000 (16:25 +0300)
This is needed to avoid ubsan warnings on BIT(31).

Signed-off-by: Jouni Malinen <j@w1.fi>
src/utils/common.h

index 88318f5..b140355 100644 (file)
@@ -433,7 +433,7 @@ void perror(const char *s);
 #endif
 
 #ifndef BIT
-#define BIT(x) (1 << (x))
+#define BIT(x) (1U << (x))
 #endif
 
 /*