diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-11-18 22:55:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-11-18 22:55:40 +0000 |
commit | 0ae7519d719d959a6a6126e93044ceab3da3dc12 (patch) | |
tree | 33d8f286b17d8e05ba2ce730a529bcb8fba1c565 | |
parent | 01ef9d16c38b163d3c0ff2b7acf62320a761e02e (diff) |
KNF
-rw-r--r-- | sbin/pfctl/parse.y | 26 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_altq.c | 4 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 6 |
3 files changed, 18 insertions, 18 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 60a9019ead0..554458f1fc7 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.187 2002/11/18 22:49:15 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.188 2002/11/18 22:55:39 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -442,7 +442,7 @@ scrubrule : SCRUB dir interface af fromto nodf minttl maxmss fragcache r.rule_flag |= $9; expand_rule(&r, $3, NULL, $5.src.host, $5.src.port, - $5.dst.host, $5.dst.port, NULL, NULL, NULL); + $5.dst.host, $5.dst.port, NULL, NULL, NULL); } ; @@ -576,7 +576,7 @@ queuespec : QUEUE STRING bandwidth priority qlimit schedtype qassign { ; schedtype : /* empty */ { $$.qtype = ALTQT_NONE; } - | CBQ { $$.qtype = ALTQT_CBQ; } + | CBQ { $$.qtype = ALTQT_CBQ; } | CBQ '(' cbqflags_list ')' { $$.qtype = ALTQT_CBQ; $$.data.cbq_opts.flags = $3; @@ -584,7 +584,7 @@ schedtype : /* empty */ { $$.qtype = ALTQT_NONE; } ; cbqflags_list : cbqflags_item { $$ |= $1; } - | cbqflags_list comma cbqflags_item { $$ |= $3; } + | cbqflags_list comma cbqflags_item { $$ |= $3; } ; @@ -601,7 +601,7 @@ bandwidth : /* empty */ { $$.bw_percent = 0; } | BANDWIDTH STRING { - double bps; + double bps; char *cp; $$.bw_percent = 0; @@ -617,7 +617,7 @@ bandwidth : /* empty */ { else if (!strcasecmp(cp, "Gb")) bps *= 1024 * 1024 * 1024; else if (*cp == '%') { - if (bps < 0 || bps > 100) { + if (bps < 0 || bps > 100) { yyerror("bandwidth spec " "out of range"); YYERROR; @@ -639,7 +639,7 @@ priority : /* empty */ { $$ = 0; } yyerror("priority out of range: max 255"); YYERROR; } - $$ = $2; + $$ = $2; } ; @@ -660,7 +660,7 @@ tbrsize : /* empty */ { $$ = 0; } yyerror("tbrsize too big: max 65535"); YYERROR; } - $$ = $1; + $$ = $1; } ; @@ -814,8 +814,8 @@ blockspec : /* empty */ { } | RETURNRST { $$.b2 = PFRULE_RETURNRST; - $$.w = 0; - $$.w2 = 0; + $$.w = 0; + $$.w2 = 0; } | RETURNRST '(' TTL number ')' { $$.b2 = PFRULE_RETURNRST; @@ -1763,7 +1763,7 @@ binatrule : no BINAT interface af proto FROM host TO ipspec redirection yyerror("'binat' source mask and " "redirect mask must be the same"); YYERROR; - } + } free($10->address); free($10); } @@ -2380,7 +2380,7 @@ expand_rule(struct pf_rule *r, char ifname[IF_NAMESIZE]; char label[PF_RULE_LABEL_SIZE]; char qname[PF_QNAME_SIZE]; - u_int8_t flags, flagset; + u_int8_t flags, flagset; strlcpy(label, r->label, sizeof(label)); strlcpy(qname, r->qname, sizeof(qname)); @@ -2678,7 +2678,7 @@ lookup(char *s) { "ecn", ECN}, { "fastroute", FASTROUTE}, { "flags", FLAGS}, - { "for", FOR}, + { "for", FOR}, { "fragment", FRAGMENT}, { "from", FROM}, { "group", GROUP}, diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c index 8ebcbc66443..624376d6d04 100644 --- a/sbin/pfctl/pfctl_altq.c +++ b/sbin/pfctl/pfctl_altq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_altq.c,v 1.1 2002/11/18 22:49:15 henning Exp $ */ +/* $OpenBSD: pfctl_altq.c,v 1.2 2002/11/18 22:55:39 deraadt Exp $ */ /* * Copyright (C) 2002 * Sony Computer Science Laboratories Inc. All rights reserved. @@ -158,7 +158,7 @@ print_queue(const struct pf_altq *a, unsigned level) for (i = 0; i < level; ++i) printf(" "); - printf("queue %s bandwidth %s priority %u", a->qname, + printf("queue %s bandwidth %s priority %u", a->qname, rate2str((double)a->bandwidth), a->priority); /* printf("queue on %s %s parent 0x%x priority %u bandwidth %s" " qlimit %u qid 0x%x\n", diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 0400f34c4ae..e45be274931 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.103 2002/11/18 22:49:15 henning Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.104 2002/11/18 22:55:39 deraadt Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -652,7 +652,7 @@ print_rule(struct pf_rule *r) printf("return-icmp"); if (ic == NULL) printf("(%u) ", r->return_icmp & 255); - else + else printf("(%s) ", ic->name); break; case AF_INET6: @@ -666,7 +666,7 @@ print_rule(struct pf_rule *r) printf("return-icmp"); if (ic == NULL) printf("(%u, ", r->return_icmp & 255); - else + else printf("(%s, ", ic->name); if (ic6 == NULL) printf("%u) ", r->return_icmp6 & 255); |