summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-02-10 17:53:38 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-02-10 17:53:38 +0000
commita4825853e8dfd09946efe0c68c2b703ac5c6b0dd (patch)
tree78f98b1e110fa272ba9ed0ce684f99e059d5255a /sbin
parent69e55a3f13c0a1d726a3b56b30357c499fe365ac (diff)
KNF
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/pfctl.c5
-rw-r--r--sbin/pfctl/pfctl_altq.c19
-rw-r--r--sbin/pfctl/pfctl_osfp.c4
-rw-r--r--sbin/pfctl/pfctl_parser.c11
-rw-r--r--sbin/pfctl/pfctl_qstats.c11
5 files changed, 28 insertions, 22 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 26631ab3e3b..88032eaa648 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.200 2004/02/04 10:43:18 mcbride Exp $ */
+/* $OpenBSD: pfctl.c,v 1.201 2004/02/10 17:53:37 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -422,7 +422,8 @@ pfctl_kill_states(int dev, int opts)
memset(&last_dst, 0xff, sizeof(last_dst));
if ((ret_ga = getaddrinfo(state_kill[1], NULL, NULL,
&res[1]))) {
- errx(1, "getaddrinfo: %s", gai_strerror(ret_ga));
+ errx(1, "getaddrinfo: %s",
+ gai_strerror(ret_ga));
/* NOTREACHED */
}
for (resp[1] = res[1]; resp[1];
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c
index 6a4e6c85adc..00706f9e38d 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_altq.c,v 1.79 2004/01/14 08:42:23 kjc Exp $ */
+/* $OpenBSD: pfctl_altq.c,v 1.80 2004/02/10 17:53:37 henning Exp $ */
/*
* Copyright (c) 2002
@@ -165,7 +165,7 @@ print_altq(const struct pf_altq *a, unsigned level, struct node_queue_bw *bw,
printf("altq on %s ", a->ifname);
- switch(a->scheduler) {
+ switch (a->scheduler) {
case ALTQT_CBQ:
if (!print_cbq_opts(a))
printf("cbq ");
@@ -487,9 +487,12 @@ cbq_compute_idletime(struct pfctl *pf, struct pf_altq *pa)
minidle = -((double)opts->maxpktsize * (double)nsPerByte);
/* scale parameters */
- maxidle = ((maxidle * 8.0) / nsPerByte) * pow(2.0, (double)RM_FILTER_GAIN);
- offtime = (offtime * 8.0) / nsPerByte * pow(2.0, (double)RM_FILTER_GAIN);
- minidle = ((minidle * 8.0) / nsPerByte) * pow(2.0, (double)RM_FILTER_GAIN);
+ maxidle = ((maxidle * 8.0) / nsPerByte) *
+ pow(2.0, (double)RM_FILTER_GAIN);
+ offtime = (offtime * 8.0) / nsPerByte *
+ pow(2.0, (double)RM_FILTER_GAIN);
+ minidle = ((minidle * 8.0) / nsPerByte) *
+ pow(2.0, (double)RM_FILTER_GAIN);
maxidle = maxidle / 1000.0;
offtime = offtime / 1000.0;
@@ -497,10 +500,10 @@ cbq_compute_idletime(struct pfctl *pf, struct pf_altq *pa)
opts->minburst = minburst;
opts->maxburst = maxburst;
- opts->ns_per_byte = (u_int) nsPerByte;
- opts->maxidle = (u_int) fabs(maxidle);
+ opts->ns_per_byte = (u_int)nsPerByte;
+ opts->maxidle = (u_int)fabs(maxidle);
opts->minidle = (int)minidle;
- opts->offtime = (u_int) fabs(offtime);
+ opts->offtime = (u_int)fabs(offtime);
return (0);
}
diff --git a/sbin/pfctl/pfctl_osfp.c b/sbin/pfctl/pfctl_osfp.c
index ca19ecaa956..8321a3c58fd 100644
--- a/sbin/pfctl/pfctl_osfp.c
+++ b/sbin/pfctl/pfctl_osfp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_osfp.c,v 1.5 2004/01/29 01:25:13 mcbride Exp $ */
+/* $OpenBSD: pfctl_osfp.c,v 1.6 2004/02/10 17:53:37 henning Exp $ */
/*
* Copyright (c) 2003 Mike Frantzen <frantzen@openbsd.org>
@@ -312,7 +312,7 @@ pfctl_show_fingerprints(int opts)
if (LIST_FIRST(&classes) != NULL) {
if (opts & PF_OPT_SHOWALL)
pfctl_print_title("OS FINGERPRINTS:");
-
+
printf("Class\tVersion\tSubtype(subversion)\n");
printf("-----\t-------\t-------------------\n");
sort_name_list(opts, &classes);
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 7c8527f8c04..708991c22cd 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.191 2004/02/10 09:27:01 cedric Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.192 2004/02/10 17:53:37 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -254,7 +254,7 @@ geticmpcodebynumber(u_int8_t type, u_int8_t code, sa_family_t af)
}
} else {
for (i=0; i < (sizeof (icmp6_code) /
- sizeof(icmp6_code[0])); i++) {
+ sizeof(icmp6_code[0])); i++) {
if (type == icmp6_code[i].type &&
code == icmp6_code[i].code)
return (&icmp6_code[i]);
@@ -658,7 +658,7 @@ print_rule(struct pf_rule *r, int verbose)
ic6 = geticmpcodebynumber(r->return_icmp6 >> 8,
r->return_icmp6 & 255, AF_INET6);
- switch(r->af) {
+ switch (r->af) {
case AF_INET:
printf(" return-icmp");
if (ic == NULL)
@@ -1021,7 +1021,8 @@ ifa_load(void)
if (n->af == AF_INET6 &&
IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)
ifa->ifa_addr)->sin6_addr) &&
- ((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_scope_id == 0) {
+ ((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_scope_id ==
+ 0) {
struct sockaddr_in6 *sin6;
sin6 = (struct sockaddr_in6 *)ifa->ifa_addr;
@@ -1058,7 +1059,7 @@ ifa_load(void)
memcpy(&n->bcast, &((struct sockaddr_in6 *)
ifa->ifa_broadaddr)->sin6_addr.s6_addr,
sizeof(struct in6_addr));
- if(ifa->ifa_dstaddr != NULL)
+ if (ifa->ifa_dstaddr != NULL)
memcpy(&n->peer, &((struct sockaddr_in6 *)
ifa->ifa_dstaddr)->sin6_addr.s6_addr,
sizeof(struct in6_addr));
diff --git a/sbin/pfctl/pfctl_qstats.c b/sbin/pfctl/pfctl_qstats.c
index 026baca276b..776c36a47c6 100644
--- a/sbin/pfctl/pfctl_qstats.c
+++ b/sbin/pfctl/pfctl_qstats.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_qstats.c,v 1.26 2004/02/05 18:06:12 henning Exp $ */
+/* $OpenBSD: pfctl_qstats.c,v 1.27 2004/02/10 17:53:37 henning Exp $ */
/*
* Copyright (c) Henning Brauer <henning@openbsd.org>
@@ -84,7 +84,7 @@ int
pfctl_show_altq(int dev, int opts, int verbose2)
{
struct pf_altq_node *root = NULL, *node;
- int nodes;
+ int nodes;
if ((nodes = pfctl_update_qstats(dev, &root)) < 0)
@@ -249,12 +249,13 @@ pfctl_print_altq_node(int dev, const struct pf_altq_node *node, unsigned level,
pfctl_print_altq_nodestat(dev, node);
if (opts & PF_OPT_DEBUG)
- printf(" [ qid=%u ifname=%s ifbandwidth=%s ]\n", node->altq.qid,
- node->altq.ifname, rate2str((double)(node->altq.ifbandwidth)));
+ printf(" [ qid=%u ifname=%s ifbandwidth=%s ]\n",
+ node->altq.qid, node->altq.ifname,
+ rate2str((double)(node->altq.ifbandwidth)));
for (child = node->children; child != NULL;
child = child->next)
- pfctl_print_altq_node(dev, child, level+1, opts);
+ pfctl_print_altq_node(dev, child, level + 1, opts);
}
void