summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-07-05 02:13:45 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-07-05 02:13:45 +0000
commit70a7d7fab331c366cda499ddb294b530ce62d9f8 (patch)
tree8a8f72dfb5b8d57fb1bc5c10a2bdbaded58674d3 /usr.sbin/bgpd
parent82e4f3eea83b547ac6c4cfd8b18a12b4eae2248c (diff)
fix a few KNF fallouts
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/bgpd.c4
-rw-r--r--usr.sbin/bgpd/bgpd.h4
-rw-r--r--usr.sbin/bgpd/imsg.c4
-rw-r--r--usr.sbin/bgpd/kroute.c8
-rw-r--r--usr.sbin/bgpd/rde.c4
-rw-r--r--usr.sbin/bgpd/rde_attr.c6
-rw-r--r--usr.sbin/bgpd/rde_prefix.c6
-rw-r--r--usr.sbin/bgpd/rde_rib.c4
-rw-r--r--usr.sbin/bgpd/rde_update.c4
9 files changed, 22 insertions, 22 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index 487096bcdc1..be79c0c27b8 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.100 2004/07/04 03:51:31 henning Exp $ */
+/* $OpenBSD: bgpd.c,v 1.101 2004/07/05 02:13:43 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -255,7 +255,7 @@ main(int argc, char *argv[])
timeout = mrt_timeout(&mrt_l);
if (timeout > MAX_TIMEOUT)
timeout = MAX_TIMEOUT;
-
+
if ((nfds = poll(pfd, POLL_MAX, timeout * 1000)) == -1)
if (errno != EINTR) {
log_warn("poll error");
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index 8b7f35a3a02..4f7fa993347 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.133 2004/07/03 17:19:59 claudio Exp $ */
+/* $OpenBSD: bgpd.h,v 1.134 2004/07/05 02:13:44 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -248,7 +248,7 @@ struct imsg_fd {
struct imsgbuf {
int fd;
pid_t pid;
- TAILQ_HEAD(fds, imsg_fd) fds;
+ TAILQ_HEAD(fds, imsg_fd) fds;
struct buf_read r;
struct msgbuf w;
};
diff --git a/usr.sbin/bgpd/imsg.c b/usr.sbin/bgpd/imsg.c
index 459ffef87dd..7d0c4f494b0 100644
--- a/usr.sbin/bgpd/imsg.c
+++ b/usr.sbin/bgpd/imsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.c,v 1.27 2004/06/20 18:07:06 henning Exp $ */
+/* $OpenBSD: imsg.c,v 1.28 2004/07/05 02:13:44 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -266,5 +266,5 @@ imsg_get_fd(struct imsgbuf *ibuf)
TAILQ_REMOVE(&ibuf->fds, ifd, entry);
free(ifd);
- return(fd);
+ return (fd);
}
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c
index 9c34801a278..a8ac95ae124 100644
--- a/usr.sbin/bgpd/kroute.c
+++ b/usr.sbin/bgpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.101 2004/06/29 20:13:07 henning Exp $ */
+/* $OpenBSD: kroute.c,v 1.102 2004/07/05 02:13:44 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -863,7 +863,7 @@ mask2prefixlen6(struct in6_addr *in6a)
l += 9 - ffs(in6a->s6_addr[i]);
return (l);
-}
+}
in_addr_t
prefixlen2mask(u_int8_t prefixlen)
@@ -894,7 +894,7 @@ prefix_equal(const struct bgpd_addr *a, const struct bgpd_addr *b,
in_addr_t mask;
int i;
u_int8_t m;
-
+
if (a->af != b->af)
return 0;
switch (a->af) {
@@ -913,7 +913,7 @@ prefix_equal(const struct bgpd_addr *a, const struct bgpd_addr *b,
i = prefixlen % 8;
if (i) {
m = 0xff00 >> i;
- if ((a->v6.s6_addr[prefixlen / 8] & m) !=
+ if ((a->v6.s6_addr[prefixlen / 8] & m) !=
(b->v6.s6_addr[prefixlen / 8] & m))
return (0);
}
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index fa3d902bd76..e335315f409 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.124 2004/07/04 03:51:31 henning Exp $ */
+/* $OpenBSD: rde.c,v 1.125 2004/07/05 02:13:44 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -196,7 +196,7 @@ rde_main(struct bgpd_config *config, struct network_head *net_l,
pfd[PFD_MRT_FILE].events = POLLOUT;
i++;
}
-
+
if ((nfds = poll(pfd, i, INFTIM)) == -1)
if (errno != EINTR)
fatal("poll error");
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index 9bfaa5393ef..7bb303ba581 100644
--- a/usr.sbin/bgpd/rde_attr.c
+++ b/usr.sbin/bgpd/rde_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_attr.c,v 1.35 2004/06/24 23:15:58 claudio Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.36 2004/07/05 02:13:44 henning Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -593,10 +593,10 @@ attr_mp_nexthop_check(u_char *data, u_int16_t len, u_int16_t afi)
nh_len = *data++;
len--;
-
+
if (nh_len > len)
return (-1);
-
+
switch (afi) {
case AFI_IPv6:
if (nh_len != 16 && nh_len != 32) {
diff --git a/usr.sbin/bgpd/rde_prefix.c b/usr.sbin/bgpd/rde_prefix.c
index 22622d61a99..b0a2892b0f7 100644
--- a/usr.sbin/bgpd/rde_prefix.c
+++ b/usr.sbin/bgpd/rde_prefix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_prefix.c,v 1.15 2004/06/22 23:17:01 claudio Exp $ */
+/* $OpenBSD: rde_prefix.c,v 1.16 2004/07/05 02:13:44 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -133,7 +133,7 @@ pt_get(struct bgpd_addr *prefix, int prefixlen)
fatalx("pt_get: bad IPv4 prefixlen");
pte4.af = AF_INET;
addr_hbo = ntohl(prefix->v4.s_addr);
- pte4.prefix4.s_addr = htonl(addr_hbo &
+ pte4.prefix4.s_addr = htonl(addr_hbo &
prefixlen2mask(prefixlen));
pte4.prefixlen = prefixlen;
return RB_FIND(pt_tree, &pttable4, (struct pt_entry *)&pte4);
@@ -170,7 +170,7 @@ pt_add(struct bgpd_addr *prefix, int prefixlen)
p4->af = AF_INET;
p4->prefixlen = prefixlen;
addr_hbo = ntohl(prefix->v4.s_addr);
- p4->prefix4.s_addr = htonl(addr_hbo &
+ p4->prefix4.s_addr = htonl(addr_hbo &
prefixlen2mask(prefixlen));
p = (struct pt_entry *)p4;
tree = &pttable4;
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index c195644b50f..e1a213ff835 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.49 2004/06/22 23:17:01 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.50 2004/07/05 02:13:44 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -774,7 +774,7 @@ nexthop_update(struct kroute_nexthop *msg)
/* should I trust in the parent ??? */
if (nh->exit_nexthop.af != msg->nexthop.af ||
(nh->exit_nexthop.af == AF_INET &&
- nh->exit_nexthop.v4.s_addr != msg->nexthop.v4.s_addr)) {
+ nh->exit_nexthop.v4.s_addr != msg->nexthop.v4.s_addr)) {
log_warnx("nexthop_update: bad nexthop returned");
return;
}
diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c
index 653dd617244..f730b89952a 100644
--- a/usr.sbin/bgpd/rde_update.c
+++ b/usr.sbin/bgpd/rde_update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_update.c,v 1.21 2004/06/22 23:17:01 claudio Exp $ */
+/* $OpenBSD: rde_update.c,v 1.22 2004/07/05 02:13:44 henning Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -111,7 +111,7 @@ up_prefix_cmp(struct update_prefix *a, struct update_prefix *b)
return (-1);
if (a->prefix.af > b->prefix.af)
return (1);
-
+
switch (a->prefix.af) {
case AF_INET:
if (ntohl(a->prefix.v4.s_addr) < ntohl(b->prefix.v4.s_addr))