diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2024-05-28 16:41:24 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2024-05-28 16:41:24 +0200 |
commit | 2d6fb31cd1142befb60cad15ce9da2a7eabb76e2 (patch) | |
tree | 4b0a29969a60864e3e9d17ebac29ad1fb0e066f3 /lib/birdlib.h | |
parent | e29f134ad9346343277b7cb4581d2a704592dc79 (diff) |
Lib: Use alloc_size() function attribute
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r-- | lib/birdlib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h index b7226411..fac7e4ea 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -75,7 +75,8 @@ static inline int u64_cmp(u64 i1, u64 i2) #define NORET __attribute__((noreturn)) #define UNUSED __attribute__((unused)) #define PACKED __attribute__((packed)) -#define NONNULL(...) __attribute__((nonnull((__VA_ARGS__)))) +#define NONNULL(...) __attribute__((nonnull(__VA_ARGS__))) +#define ALLOC_SIZE(...) __attribute__((alloc_size(__VA_ARGS__))) #define STATIC_ASSERT(EXP) _Static_assert(EXP, #EXP) #define STATIC_ASSERT_MSG(EXP,MSG) _Static_assert(EXP, MSG) |