diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-06 17:06:49 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-01-01 14:34:56 -0800 |
commit | 2bb1bd63e2e766ce281a61cadbffad7a12d5fd18 (patch) | |
tree | ddfc6fe3d1faf808f982be2bccd90e32e3b0e74c /ifparser.c | |
parent | 78139e4cfe37c56bb8e06a2574c7d476d9607af9 (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |