forked from ariadne/pkgconf
pkg: fix foreach_list_entry_safe() macro
parent
3eb16dca0f
commit
0d2a507bcd
2
pkg.h
2
pkg.h
|
@ -60,7 +60,7 @@ typedef struct fragment_ pkg_fragment_t;
|
||||||
for ((value) = (head); (value) != NULL; (value) = (value)->next)
|
for ((value) = (head); (value) != NULL; (value) = (value)->next)
|
||||||
|
|
||||||
#define foreach_list_entry_safe(head, nextiter, value) \
|
#define foreach_list_entry_safe(head, nextiter, value) \
|
||||||
for ((value) = (head), (nextiter) = (head)->next; (value) != NULL; (value) = (nextiter), (nextiter) = (nextiter)->next)
|
for ((value) = (head), (nextiter) = (head) != NULL ? (head)->next : NULL; (value) != NULL; (value) = (nextiter), (nextiter) = (nextiter) != NULL ? (nextiter)->next : NULL)
|
||||||
|
|
||||||
#define LOCAL_COPY(a) \
|
#define LOCAL_COPY(a) \
|
||||||
strcpy(alloca(strlen(a) + 1), a)
|
strcpy(alloca(strlen(a) + 1), a)
|
||||||
|
|
Loading…
Reference in New Issue