Commit 65017d83 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

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: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent d05377e1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -85,7 +85,6 @@ n [A-Za-z0-9_-]

%%
	int str = 0;
	int ts, i;

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

<HELP>{
	[ \t]+	{
		int ts, i;

		ts = 0;
		for (i = 0; i < yyleng; i++) {
			if (yytext[i] == '\t')