Lists: unneccessary test killed, make code friendly to non-gcc.
This commit is contained in:
parent
c93214d442
commit
cf3934c569
1 changed files with 2 additions and 3 deletions
|
@ -23,10 +23,9 @@ typedef struct list { /* In fact two overlayed nodes */
|
||||||
#define WALK_LIST(n,list) for((n)=HEAD(list);(NODE (n))->next; \
|
#define WALK_LIST(n,list) for((n)=HEAD(list);(NODE (n))->next; \
|
||||||
n=(void *)((NODE (n))->next))
|
n=(void *)((NODE (n))->next))
|
||||||
#define WALK_LIST_DELSAFE(n,ne,list) \
|
#define WALK_LIST_DELSAFE(n,ne,list) \
|
||||||
if ( ((NODE n) = HEAD(list)) ) \
|
for( ne = (void *) (NODE n)->next; \
|
||||||
for( (NODE ne) = (NODE n)->next; \
|
|
||||||
ne; \
|
ne; \
|
||||||
(NODE ne) = (NODE (n=ne))->next )
|
ne = (void *) (NODE (n=ne))->next )
|
||||||
|
|
||||||
#define EMPTY_LIST(list) (!(list).head->next)
|
#define EMPTY_LIST(list) (!(list).head->next)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue