diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-05 16:43:25 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-05 16:43:25 +0000 |
commit | f43c4ace9dc866f75d5d53f1d7a3e888abcaef8b (patch) | |
tree | cf506be75f4abd19e909171573f9bb7a1bed73bd /usr.sbin/bgpctl | |
parent | 0493a24226fb30ad64876e821820aa7801b359d4 (diff) |
gremlins keep putting tiny KNF violations in my code in the hope I don't
spot 'em
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r-- | usr.sbin/bgpctl/irr_prefix.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpctl/irrfilter.c | 6 | ||||
-rw-r--r-- | usr.sbin/bgpctl/irrfilter.h | 4 | ||||
-rw-r--r-- | usr.sbin/bgpctl/whois.c | 7 |
4 files changed, 11 insertions, 10 deletions
diff --git a/usr.sbin/bgpctl/irr_prefix.c b/usr.sbin/bgpctl/irr_prefix.c index 77554c5f00b..98e26ffbe64 100644 --- a/usr.sbin/bgpctl/irr_prefix.c +++ b/usr.sbin/bgpctl/irr_prefix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: irr_prefix.c,v 1.10 2007/03/05 16:40:10 henning Exp $ */ +/* $OpenBSD: irr_prefix.c,v 1.11 2007/03/05 16:43:24 henning Exp $ */ /* * Copyright (c) 2007 Henning Brauer <henning@openbsd.org> @@ -132,7 +132,7 @@ prefixset_aggregate(struct prefix_set *pfxs) free(pfxs->prefix[i]); pfxs->prefix[i] = cur = NULL; } - } + } if (cur != NULL) { pfxs->prefix[newcnt++] = cur; diff --git a/usr.sbin/bgpctl/irrfilter.c b/usr.sbin/bgpctl/irrfilter.c index 203411d2d7c..eaff0aca58d 100644 --- a/usr.sbin/bgpctl/irrfilter.c +++ b/usr.sbin/bgpctl/irrfilter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: irrfilter.c,v 1.1 2007/03/03 11:45:30 henning Exp $ */ +/* $OpenBSD: irrfilter.c,v 1.2 2007/03/05 16:43:24 henning Exp $ */ /* * Copyright (c) 2007 Henning Brauer <henning@openbsd.org> @@ -41,12 +41,12 @@ irr_main(u_int32_t AS, int flags, char *outdir) if (asprintf(&query, "AS%u", AS) == -1) err(1, "parse_policy asprintf"); if ((r = whois(query, QTYPE_OWNAS)) == -1) - exit (1); + exit(1); if (r == 0) errx(1, "aut-num object %s not found", query); free(query); write_filters(outdir); - exit (0); + exit(0); } diff --git a/usr.sbin/bgpctl/irrfilter.h b/usr.sbin/bgpctl/irrfilter.h index 8c00626b180..d82f02f7c97 100644 --- a/usr.sbin/bgpctl/irrfilter.h +++ b/usr.sbin/bgpctl/irrfilter.h @@ -1,4 +1,4 @@ -/* $OpenBSD: irrfilter.h,v 1.5 2007/03/05 11:07:47 henning Exp $ */ +/* $OpenBSD: irrfilter.h,v 1.6 2007/03/05 16:43:24 henning Exp $ */ /* * Copyright (c) 2007 Henning Brauer <henning@openbsd.org> @@ -48,7 +48,7 @@ struct router { }; TAILQ_HEAD(router_head, router) router_head; - + /* keep qtype and qtype_objs in whois.c in sync! */ enum qtype { QTYPE_NONE, diff --git a/usr.sbin/bgpctl/whois.c b/usr.sbin/bgpctl/whois.c index 67446327840..839dcbba13a 100644 --- a/usr.sbin/bgpctl/whois.c +++ b/usr.sbin/bgpctl/whois.c @@ -1,4 +1,4 @@ -/* $OpenBSD: whois.c,v 1.2 2007/03/05 12:42:13 henning Exp $ */ +/* $OpenBSD: whois.c,v 1.3 2007/03/05 16:43:24 henning Exp $ */ /* * Copyright (c) 2007 Henning Brauer <henning@openbsd.org> @@ -101,8 +101,9 @@ whois(const char *query, enum qtype qtype) do { attempt++; if (s != -1) - close (s); - s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); + close(s); + s = socket(ai->ai_family, ai->ai_socktype, + ai->ai_protocol); if (s == -1) { error = errno; reason = "socket"; |