]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
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 88318f5d255a71e20f358b940b5122297b63e1ae..b140355132d60f627ff133f7e48c7be9a462cac6 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
 
 /*