diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-10 11:38:04 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-11 14:35:34 -0800 |
commit | 64761ee9424f755b84ab0ce02d13eda32d215a14 (patch) | |
tree | 0d5369ba1460fb9c4be686511de659ed653362ba /xkbscan.c | |
parent | 9737af15196380a1687d18a17d297ee17b45a83f (diff) |
Variable scope reductions
Some found by cppcheck, some found by manual code inspection
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xkbscan.c')
-rw-r--r-- | xkbscan.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -576,7 +576,7 @@ static int numKeywords = sizeof(keywords) / sizeof(struct _Keyword); static int yyGetIdent(int first) { - int ch, i, j, found; + int ch, j, found; int rtrn = IDENT; scanBuf[0] = first; @@ -589,7 +589,7 @@ yyGetIdent(int first) scanBuf[j++] = '\0'; found = 0; - for (i = 0; (!found) && (i < numKeywords); i++) + for (int i = 0; (!found) && (i < numKeywords); i++) { if (uStrCaseCmp(scanBuf, keywords[i].keyword) == 0) { |