[util] Make FREE a little more macro-correct

That is, use ()s around uses of p
This commit is contained in:
Bill Currie 2024-02-18 20:54:52 +09:00
parent 6e8c98433a
commit a6b59d4a42

View file

@ -94,10 +94,10 @@ static struct DARRAY_TYPE(t *) n##_blocks = DARRAY_STATIC_INIT(8)
\hideinitializer
*/
#define FREE(n, p) \
do { \
p->next = n##_freelist; \
n##_freelist = p; \
#define FREE(n, p) \
do { \
(p)->next = n##_freelist; \
n##_freelist = (p); \
} while (0)
#else
#define ALLOC(s, t, n, v) \