]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Lib: Fix static assert macro
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 6 Jun 2021 15:23:45 +0000 (17:23 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 6 Jun 2021 15:23:45 +0000 (17:23 +0200)
lib/birdlib.h

index 6240c343f42cfa642e426a48e578c7c6ad7fa323..431b7c0d856acabc7c060d7739d5cd7a63b46837 100644 (file)
@@ -74,7 +74,8 @@ static inline int u64_cmp(u64 i1, u64 i2)
 #define PACKED __attribute__((packed))
 #define NONNULL(...) __attribute__((nonnull((__VA_ARGS__))))
 
-#define STATIC_ASSERT(...) _Static_assert(__VA_ARGS__)
+#define STATIC_ASSERT(EXP) _Static_assert(EXP, #EXP)
+#define STATIC_ASSERT_MSG(EXP,MSG) _Static_assert(EXP, MSG)
 
 #ifndef HAVE_THREAD_LOCAL
 #define _Thread_local