summaryrefslogtreecommitdiff
path: root/ifparser.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-06 17:06:49 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-01 14:34:56 -0800
commit2bb1bd63e2e766ce281a61cadbffad7a12d5fd18 (patch)
treeddfc6fe3d1faf808f982be2bccd90e32e3b0e74c /ifparser.c
parent78139e4cfe37c56bb8e06a2574c7d476d9607af9 (diff)
Variable scope reduction as suggested by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'ifparser.c')
-rw-r--r--ifparser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ifparser.c b/ifparser.c
index c53d6d1..631b4f0 100644
--- a/ifparser.c
+++ b/ifparser.c
@@ -202,7 +202,7 @@ parse_character(IfParser *g, const char *cp, long *valp)
static const char *
parse_value(IfParser *g, const char *cp, long *valp)
{
- const char *var, *varend;
+ const char *var;
*valp = 0;
@@ -286,6 +286,8 @@ parse_value(IfParser *g, const char *cp, long *valp)
else if (!isvarfirstletter(*cp))
return CALLFUNC(g, handle_error) (g, cp, "variable or number");
else {
+ const char *varend;
+
DO(cp = parse_variable(g, cp, &var));
varend = cp;
SKIPSPACE(cp);