summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-03-27 21:45:28 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-03-27 21:45:28 (GMT)
commit2a65ecb780e2a5cd47bc4b9af947b1127e972a11 (patch)
tree4d1bec6fb771af4189bbb0da00cc1f3c723c9b6f /Parser
parent5a6c018b57d3c9fa9ac67809f5745d88971d5aca (diff)
downloadcpython-2a65ecb780e2a5cd47bc4b9af947b1127e972a11.zip
cpython-2a65ecb780e2a5cd47bc4b9af947b1127e972a11.tar.gz
cpython-2a65ecb780e2a5cd47bc4b9af947b1127e972a11.tar.bz2
Issue #26130: Remove redundant variable 's' from Parser/parser.c
Patch by Oren Milman.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parser.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Parser/parser.c b/Parser/parser.c
index 56ec514..41072c4 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -140,21 +140,20 @@ classify(parser_state *ps, int type, const char *str)
int n = g->g_ll.ll_nlabels;
if (type == NAME) {
- const char *s = str;
label *l = g->g_ll.ll_label;
int i;
for (i = n; i > 0; i--, l++) {
if (l->lb_type != NAME || l->lb_str == NULL ||
- l->lb_str[0] != s[0] ||
- strcmp(l->lb_str, s) != 0)
+ l->lb_str[0] != str[0] ||
+ strcmp(l->lb_str, str) != 0)
continue;
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
#if 0
/* Leaving this in as an example */
if (!(ps->p_flags & CO_FUTURE_WITH_STATEMENT)) {
- if (s[0] == 'w' && strcmp(s, "with") == 0)
+ if (str[0] == 'w' && strcmp(str, "with") == 0)
break; /* not a keyword yet */
- else if (s[0] == 'a' && strcmp(s, "as") == 0)
+ else if (str[0] == 'a' && strcmp(str, "as") == 0)
break; /* not a keyword yet */
}
#endif