summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-02-17 14:36:47 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-02-17 14:36:47 +0000
commit98c81304a633e6ae4b797f394f672f0dcd2f4730 (patch)
tree82870d48bcd4f4e0339e9be5f543f4c6ee39fc8e
parent826b4f85683562ad44c3fdcc046a3f8e988a6fd3 (diff)
"optarg" was a bad pick for the variable name in pfctl_cmdline_symset, it
shadows a global. rename.
-rw-r--r--sbin/pfctl/parse.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index ca11df71950..6377f60b195 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.321 2003/02/17 06:56:04 mpech Exp $ */
+/* $OpenBSD: parse.y,v 1.322 2003/02/17 14:36:46 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -3792,18 +3792,18 @@ symset(const char *nam, const char *val, int persist)
}
int
-pfctl_cmdline_symset(char *optarg)
+pfctl_cmdline_symset(char *s)
{
char *sym, *val;
int ret;
- if ((val = strrchr(optarg, '=')) == NULL)
+ if ((val = strrchr(s, '=')) == NULL)
return (-1);
- if ((sym = malloc(strlen(optarg) - strlen(val) + 1)) == NULL)
+ if ((sym = malloc(strlen(s) - strlen(val) + 1)) == NULL)
err(1, "pfctl_cmdline_symset: malloc");
- strlcpy(sym, optarg, strlen(optarg) - strlen(val) + 1);
+ strlcpy(sym, s, strlen(s) - strlen(val) + 1);
ret = symset(sym, val + 1, 1);
free(sym);