blob: 6f447e676fd9607170a0e13129b13815226a61a9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#ifndef UTIL_H
#define UTIL_H
#define ARRAY_LEN(first, ...) \
(sizeof(((typeof(first) []){first, __VA_ARGS__}))/(sizeof(typeof(first))))
#define bool_equal(a,b) ({ \
typeof(a) _a = (a); \
typeof(b) _b = (b); \
((_a) ? (_b) : (!(_b))); \
})
#endif
|