diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-11 02:39:06 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-11 02:39:06 +0000 |
commit | 435da2b36fc029a78b14648cb8275ffc30984041 (patch) | |
tree | 09b542e8b68cfb155235afc7cb86ef69f28d8925 /usr.sbin | |
parent | 2544c10365f647065c513b53c8ba02e0a93669f2 (diff) |
KNF
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_decide.c | 8 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_rib.c | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 09470f5dce2..ee6f398ca87 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.52 2004/01/10 22:25:42 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.53 2004/01/11 02:39:05 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -634,7 +634,7 @@ rde_update_queue_runner(void) { struct rde_peer *peer; int r, sent; - u_int16_t len, wd_len, wpos; + u_int16_t len, wd_len, wpos; len = sizeof(queue_buf) - MSGSIZE_HEADER; do { diff --git a/usr.sbin/bgpd/rde_decide.c b/usr.sbin/bgpd/rde_decide.c index 08c18bc3bac..565167378ca 100644 --- a/usr.sbin/bgpd/rde_decide.c +++ b/usr.sbin/bgpd/rde_decide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_decide.c,v 1.13 2004/01/10 22:25:42 claudio Exp $ */ +/* $OpenBSD: rde_decide.c,v 1.14 2004/01/11 02:39:05 henning Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -352,7 +352,7 @@ up_add(struct rde_peer *peer, struct update_prefix *p, struct update_attr *a) struct update_prefix *np; ENSURE(p != NULL); - + /* 1. search for attr */ if (a != NULL && (na = RB_FIND(uptree_attr, &peer->up_attrs, a)) == NULL) { @@ -409,7 +409,7 @@ up_add(struct rde_peer *peer, struct update_prefix *p, struct update_attr *a) void up_generate_updates(struct prefix *new, struct prefix *old) { - extern struct rde_peer_head peerlist; + extern struct rde_peer_head peerlist; struct rde_peer *peer; struct update_attr *a; struct update_prefix *p; @@ -587,7 +587,7 @@ up_dump_prefix(u_char *buf, int len, struct uplist_prefix *prefix_head, upp != TAILQ_END(prefix_head); upp = xupp) { xupp = TAILQ_NEXT(upp, prefix_l); if ((r = up_set_prefix(buf + wpos, len - wpos, - upp->prefix, upp->prefixlen)) == -1) + upp->prefix, upp->prefixlen)) == -1) break; wpos += r; if (RB_REMOVE(uptree_prefix, &peer->up_prefix, upp) == NULL) diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c index f4712ffef3b..97b61b480ee 100644 --- a/usr.sbin/bgpd/rde_rib.c +++ b/usr.sbin/bgpd/rde_rib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_rib.c,v 1.16 2004/01/10 22:25:42 claudio Exp $ */ +/* $OpenBSD: rde_rib.c,v 1.17 2004/01/11 02:39:05 henning Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -95,9 +95,9 @@ attr_compare(struct attr_flags *a, struct attr_flags *b) return (1); if (a->med < b->med) return (-1); - if (a->lpref > b->lpref) + if (a->lpref > b->lpref) return (1); - if (a->lpref < b->lpref) + if (a->lpref < b->lpref) return (-1); r = aspath_compare(a->aspath, b->aspath); if (r > 0) @@ -106,8 +106,8 @@ attr_compare(struct attr_flags *a, struct attr_flags *b) return (-1); for (oa = TAILQ_FIRST(&a->others), ob = TAILQ_FIRST(&b->others); - oa != TAILQ_END(&a->others) && ob != TAILQ_END(&a->others); - oa = TAILQ_NEXT(oa, attr_l), ob = TAILQ_NEXT(ob, attr_l)) { + oa != TAILQ_END(&a->others) && ob != TAILQ_END(&a->others); + oa = TAILQ_NEXT(oa, attr_l), ob = TAILQ_NEXT(ob, attr_l)) { if (oa->type > ob->type) return (1); if (oa->type < ob->type) |