Parcourir la 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 il y a 10 ans
Parent
commit
32d6463fe7
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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
 
 /*