diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-01 05:28:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-01 05:28:23 +0000 |
commit | 1586822faaed9479673c8a8c808fa405a7ed35d0 (patch) | |
tree | 83abd0ffea9650247bef11329300e9e5c195abdb | |
parent | f27734140455e9a94216f9c680cc2ee16e8fa293 (diff) |
KNF
-rw-r--r-- | sbin/pfctl/parse.y | 16 | ||||
-rw-r--r-- | sbin/pfctl/pfctl.c | 6 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 0ad3398ad36..51dbf4627cf 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.108 2002/06/28 19:29:45 dhartmei Exp $ */ +/* $OpenBSD: parse.y,v 1.109 2002/07/01 05:28:22 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -60,7 +60,7 @@ static int rulestate = 0; enum {PFCTL_STATE_NONE=0, PFCTL_STATE_OPTION=1, PFCTL_STATE_SCRUB=2, PFCTL_STATE_NAT=3, PFCTL_STATE_FILTER=4}; - + struct node_if { char ifname[IFNAMSIZ]; u_int8_t not; @@ -274,7 +274,7 @@ option : SET OPTIMIZATION STRING yyerror("error setting loginterface %s", $3); YYERROR; } - } + } ; varset : STRING PORTUNARY STRING @@ -291,7 +291,7 @@ varset : STRING PORTUNARY STRING scrubrule : SCRUB dir interface fromto nodf minttl maxmss fragcache { struct pf_rule r; - + if (check_rulestate(PFCTL_STATE_SCRUB)) YYERROR; @@ -336,7 +336,7 @@ pfrule : action dir log quick interface route af proto fromto if (check_rulestate(PFCTL_STATE_FILTER)) YYERROR; - + memset(&r, 0, sizeof(r)); r.action = $1.b1; @@ -1255,7 +1255,7 @@ natrule : no NAT interface af proto fromto redirection if (check_rulestate(PFCTL_STATE_NAT)) YYERROR; - + memset(&nat, 0, sizeof(nat)); nat.no = $1; @@ -1306,7 +1306,7 @@ binatrule : no BINAT interface af proto FROM address TO ipspec redirection if (check_rulestate(PFCTL_STATE_NAT)) YYERROR; - + memset(&binat, 0, sizeof(binat)); binat.no = $1; @@ -1412,7 +1412,7 @@ rdrrule : no RDR interface af proto FROM ipspec TO ipspec dport redirection if (check_rulestate(PFCTL_STATE_NAT)) YYERROR; - + memset(&rdr, 0, sizeof(rdr)); rdr.no = $1; diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index dd792d6c0b8..30c4d6b660d 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.81 2002/06/25 08:13:26 henning Exp $ */ +/* $OpenBSD: pfctl.c,v 1.82 2002/07/01 05:28:22 deraadt Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -77,7 +77,7 @@ char *showopt; char *debugopt; int state_killers; char *state_kill[2]; -int loadopt = PFCTL_FLAG_ALL; +int loadopt = PFCTL_FLAG_ALL; char *infile; @@ -732,7 +732,7 @@ pfctl_set_optimization(struct pfctl *pf, const char *opt) } for (i = 0; hint[i].name; i++) - if ((r = pfctl_set_timeout(pf, hint[i].name, + if ((r = pfctl_set_timeout(pf, hint[i].name, hint[i].timeout))) return (r); } diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 4911860e254..3021c814448 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.91 2002/06/27 10:17:48 henning Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.92 2002/07/01 05:28:22 deraadt Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -584,9 +584,9 @@ print_status(struct pf_status *s) s->bcounters[0][PF_IN], s->bcounters[1][PF_IN]); printf(" %-25s %14llu %16llu\n", "Bytes Out", s->bcounters[0][PF_OUT], s->bcounters[1][PF_OUT]); - printf(" Packets In\n"); + printf(" Packets In\n"); printf(" %-23s %14llu %16llu\n", "Passed", - s->pcounters[0][PF_IN][PF_PASS], + s->pcounters[0][PF_IN][PF_PASS], s->pcounters[1][PF_IN][PF_PASS]); printf(" %-23s %14llu %16llu\n", "Blocked", s->pcounters[0][PF_IN][PF_DROP], @@ -608,7 +608,7 @@ print_status(struct pf_status *s) printf("%14.1f/s\n", (double)s->fcounters[i] / (double)runtime); else - printf("%14s\n", ""); + printf("%14s\n", ""); } printf("Counters\n"); for (i = 0; i < PFRES_MAX; i++) { @@ -618,7 +618,7 @@ print_status(struct pf_status *s) printf("%14.1f/s\n", (double)s->counters[i] / (double)runtime); else - printf("%14s\n", ""); + printf("%14s\n", ""); } } |