gluon-radv-filterd: Fix parenthesis in foreach macros

This commit is contained in:
Jan-Philipp Litza 2018-01-03 15:20:21 +01:00
parent 779f17af89
commit 8d4a7bdaf9
No known key found for this signature in database
GPG Key ID: 1FB658053CE27196

View File

@ -90,12 +90,12 @@
#endif #endif
#define foreach(item, list) \ #define foreach(item, list) \
for(item = list; item != NULL; item = item->next) for((item) = (list); (item) != NULL; (item) = (item)->next)
#define foreach_safe(item, safe, list) \ #define foreach_safe(item, safe, list) \
for (item = (list); \ for ((item) = (list); \
(item) && (((safe) = item->next) || 1); \ (item) && (((safe) = item->next) || 1); \
item = safe) (item) = (safe))
struct router { struct router {
struct router *next; struct router *next;