diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-09-27 21:54:36 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-09-30 02:05:10 +0900 |
commit | 65017d8381e2425a1b4cdc4681fadc179635c000 (patch) | |
tree | 44a11dfc9eb5d111c5af953611427efb6084df53 /scripts/kconfig | |
parent | d05377e184fc88e965e20606da93387b8fadf493 (diff) | |
download | linux-65017d8381e2425a1b4cdc4681fadc179635c000.tar.bz2 |
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 <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/lexer.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l index 312cbad2d34d..efe487859308 100644 --- a/scripts/kconfig/lexer.l +++ b/scripts/kconfig/lexer.l @@ -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') |