]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Lists: unneccessary test killed, make code friendly to non-gcc.
authorPavel Machek <pavel@ucw.cz>
Wed, 14 Oct 1998 13:27:53 +0000 (13:27 +0000)
committerPavel Machek <pavel@ucw.cz>
Wed, 14 Oct 1998 13:27:53 +0000 (13:27 +0000)
lib/lists.h

index a60bf16e395ebf1029e91c0dbe135afd0dbbb0ba..7fd697e5d39dc58e7888c027ff5b94dbc323a417 100644 (file)
@@ -23,10 +23,9 @@ typedef struct list {                        /* In fact two overlayed nodes */
 #define WALK_LIST(n,list) for((n)=HEAD(list);(NODE (n))->next; \
                                n=(void *)((NODE (n))->next))
 #define WALK_LIST_DELSAFE(n,ne,list) \
-  if ( ((NODE n) = HEAD(list)) ) \
-    for( (NODE ne) = (NODE n)->next; \
+    for( ne = (void *) (NODE n)->next; \
          ne; \
-         (NODE ne) = (NODE (n=ne))->next )
+         ne = (void *) (NODE (n=ne))->next )
 
 #define EMPTY_LIST(list) (!(list).head->next)