Browse Source

Make BIT() unsigned int instead of int

This is needed to avoid ubsan warnings on BIT(31).

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 9 years ago
parent
commit
32d6463fe7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/utils/common.h

+ 1 - 1
src/utils/common.h

@@ -433,7 +433,7 @@ void perror(const char *s);
 #endif
 
 #ifndef BIT
-#define BIT(x) (1 << (x))
+#define BIT(x) (1U << (x))
 #endif
 
 /*