summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/mrt.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-02-19 13:54:59 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-02-19 13:54:59 +0000
commitab07350c16c79d16babb36da629198c73a1497b5 (patch)
tree41595ba2bafa7881347f58e3f922b82c7e80a280 /usr.sbin/bgpd/mrt.c
parent66c12e8fef994277c60a99cb9e108d32aea1310b (diff)
Make the code more portable. Add some missing header files and make the use
of the queue(3) makros more portable. OK henning@ some time ago.
Diffstat (limited to 'usr.sbin/bgpd/mrt.c')
-rw-r--r--usr.sbin/bgpd/mrt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c
index 82b3b17ca52..bc2cb13a4d4 100644
--- a/usr.sbin/bgpd/mrt.c
+++ b/usr.sbin/bgpd/mrt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mrt.c,v 1.25 2004/02/02 21:29:50 henning Exp $ */
+/* $OpenBSD: mrt.c,v 1.26 2004/02/19 13:54:58 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -565,7 +565,7 @@ mrt_select(struct mrt_head *mc, struct pollfd *pfd, struct mrt **mrt,
int t;
now = time(NULL);
- for (m = LIST_FIRST(mc); m != LIST_END(mc); m = xm) {
+ for (m = LIST_FIRST(mc); m != NULL; m = xm) {
xm = LIST_NEXT(m, list);
if (m->state == MRT_STATE_TOREMOVE) {
imsg_compose(m->ibuf, IMSG_MRT_END, 0,
@@ -750,8 +750,8 @@ mrt_mergeconfig(struct mrt_head *xconf, struct mrt_head *nconf)
xm->state = MRT_STATE_TOREMOVE;
/* free config */
- for (m = LIST_FIRST(nconf); m != LIST_END(nconf); m = xm) {
- xm = LIST_NEXT(m, list);
+ while ((m = LIST_FIRST(nconf)) != NULL) {
+ LIST_REMOVE(m, list);
free(m);
}