diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/parse.y | 14 | ||||
-rw-r--r-- | sbin/pfctl/pfctl.h | 4 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 4 | ||||
-rw-r--r-- | sbin/pfctl/pfctl_radix.c | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 8fbf80e3e44..8600be752ed 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.396 2003/07/04 10:42:16 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.397 2003/07/04 11:05:44 henning Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -861,7 +861,7 @@ tabledef : TABLE '<' STRING '>' table_opts { pf->anchor, pf->ruleset, pf->ab, pf->tticket)) { yyerror("cannot define table %s: %s", $3, pfr_strerror(errno)); - YYERROR; + YYERROR; } pf->tdirty = 1; } @@ -894,11 +894,11 @@ table_opt : STRING } | '{' tableaddrs '}' { table_opts.init_addr = 1; } | FILENAME STRING { - if(pfr_buf_load(pf->ab, $2, 0, append_addr)) { + if (pfr_buf_load(pf->ab, $2, 0, append_addr)) { if (errno) - yyerror("cannot load %s: %s", $2, - pfr_strerror(errno)); - YYERROR; + yyerror("cannot load %s: %s", $2, + pfr_strerror(errno)); + YYERROR; } table_opts.init_addr = 1; } @@ -917,7 +917,7 @@ tableaddr : not STRING { } | not STRING '/' number { char *buf = NULL; - + if (asprintf(&buf, "%s/%d", $2, $4) < 0) { if (errno) yyerror("cannot add %s/%d: %s", $2, $4, diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index 3e4cbc1f202..ad6e0b85aec 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.h,v 1.22 2003/07/03 09:13:06 cedric Exp $ */ +/* $OpenBSD: pfctl.h,v 1.23 2003/07/04 11:05:44 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -41,7 +41,7 @@ struct pfr_buffer { void *pfrb_caddr; /* malloc'ated memory area */ }; #define PFRB_FOREACH(var, buf) \ - for((var) = pfr_buf_next((buf), NULL); \ + for ((var) = pfr_buf_next((buf), NULL); \ (var) != NULL; \ (var) = pfr_buf_next((buf), (var))) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 133f3f335c6..368e24dcfec 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.166 2003/07/04 10:42:17 henning Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.167 2003/07/04 11:05:44 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1180,7 +1180,7 @@ host_dns(const char *s, int v4mask, int v6mask) * if set to 1, only simple addresses are accepted (no netblock, no "!"). */ int -append_addr(struct pfr_buffer *b, char *s, int test) +append_addr(struct pfr_buffer *b, char *s, int test) { return append_addr_not(b, s, test, 0); } diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c index 64a2fc187f8..1ff36e3e643 100644 --- a/sbin/pfctl/pfctl_radix.c +++ b/sbin/pfctl/pfctl_radix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_radix.c,v 1.17 2003/07/03 09:13:06 cedric Exp $ */ +/* $OpenBSD: pfctl_radix.c,v 1.18 2003/07/04 11:05:44 henning Exp $ */ /* * Copyright (c) 2002 Cedric Berger @@ -451,7 +451,7 @@ pfr_ina_define(struct pfr_table *tbl, struct pfr_addr *addr, int size, /* buffer managment code */ -size_t buf_esize[PFRB_MAX] = { 0, +size_t buf_esize[PFRB_MAX] = { 0, sizeof(struct pfr_table), sizeof(struct pfr_tstats), sizeof(struct pfr_addr), sizeof(struct pfr_astats), }; @@ -495,7 +495,7 @@ pfr_buf_next(struct pfr_buffer *b, const void *prev) return (b->pfrb_caddr); bs = buf_esize[b->pfrb_type]; if ((((caddr_t)prev)-((caddr_t)b->pfrb_caddr)) / bs >= b->pfrb_size-1) - return (NULL); + return (NULL); return (((caddr_t)prev) + bs); } @@ -548,7 +548,7 @@ pfr_buf_grow(struct pfr_buffer *b, int minsize) * reset buffer and free memory. */ void -pfr_buf_clear(struct pfr_buffer *b) +pfr_buf_clear(struct pfr_buffer *b) { if (b == NULL) return; |