Skip to content

Commit 65017d8

Browse files
committed
kconfig: narrow the scope of variables in the lexer
The variables, "ts" and "i", are used locally in the action of the [ \t]+ pattern in the <HELP> start state. Define them where they are used. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent d05377e commit 65017d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/kconfig/lexer.l

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ n [A-Za-z0-9_-]
8585

8686
%%
8787
int str = 0;
88-
int ts, i;
8988

9089
#.* /* ignore comment */
9190
[ \t]* /* whitespaces */
@@ -196,6 +195,8 @@ n [A-Za-z0-9_-]
196195

197196
<HELP>{
198197
[ \t]+ {
198+
int ts, i;
199+
199200
ts = 0;
200201
for (i = 0; i < yyleng; i++) {
201202
if (yytext[i] == '\t')

0 commit comments

Comments
 (0)