diff options
-rw-r--r-- | lib/linklist.h | 1 | ||||
-rw-r--r-- | ospfd/ospf_ase.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_route.c | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/linklist.h b/lib/linklist.h index 39e70293d..ea5a3531a 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -52,6 +52,7 @@ struct list { }; #define listnextnode(X) ((X) ? ((X)->next) : NULL) +#define listnextnode_unchecked(X) ((X)->next) #define listhead(X) ((X) ? ((X)->head) : NULL) #define listtail(X) ((X) ? ((X)->tail) : NULL) #define listcount(X) ((X)->count) diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c index d42562486..c799a4b30 100644 --- a/ospfd/ospf_ase.c +++ b/ospfd/ospf_ase.c @@ -582,7 +582,7 @@ static int ospf_ase_route_match_same(struct route_table *rt, /* Check each path. */ for (n1 = listhead(or->paths), n2 = listhead(newor->paths); n1 && n2; - n1 = listnextnode(n1), n2 = listnextnode(n2)) { + n1 = listnextnode_unchecked(n1), n2 = listnextnode_unchecked(n2)) { op = listgetdata(n1); newop = listgetdata(n2); diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c index b964bbab7..b36f2f465 100644 --- a/ospfd/ospf_route.c +++ b/ospfd/ospf_route.c @@ -170,8 +170,8 @@ int ospf_route_match_same(struct route_table *rt, struct prefix_ipv4 *prefix, /* Check each path. */ for (n1 = listhead(or->paths), n2 = listhead(newor->paths); - n1 && n2; - n1 = listnextnode(n1), n2 = listnextnode(n2)) { + n1 && n2; n1 = listnextnode_unchecked(n1), + n2 = listnextnode_unchecked(n2)) { op = listgetdata(n1); newop = listgetdata(n2); |