Align: Make sure 1 is treated as unsigned long instead of int
[coreboot.git] / src / include / stdlib.h
index 45420d78764068de6f37852c0585b66ea756372b..5465c14f925be86ecd16fbcb0499d704b3674749 100644 (file)
@@ -5,7 +5,7 @@
 
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
-#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1)
+#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1UL)
 #define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))
 
 #define MIN(a,b) ((a) < (b) ? (a) : (b))