summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/parser.y
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-02-02 16:58:00 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2024-02-19 10:20:40 +0100
commit313c6cd3c2d538073b71f15a46c2cbcde5712f46 (patch)
tree07e8ff5592741fcfe091f6a47ad7c9ccd62bbc16 /scripts/kconfig/parser.y
parentkconfig: fix infinite loop when expanding a macro at the end of file (diff)
downloadlinux-313c6cd3c2d538073b71f15a46c2cbcde5712f46.tar.xz
linux-313c6cd3c2d538073b71f15a46c2cbcde5712f46.zip
kconfig: fix off-by-one in zconf_error()
yyerror() reports the line number of the next line. This +1 adjustment was introduced more than 20 years ago [1]. At that time, the line number was decremented then incremented back and forth. The line number management was refactored in a more maintainable way. Such compensation is no longer needed. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=d4f8a4530eb07a1385fd17b0e62a7dce97486f49 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to '')
-rw-r--r--scripts/kconfig/parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y
index 2af7ce4e1531..5ab2e3f7ca33 100644
--- a/scripts/kconfig/parser.y
+++ b/scripts/kconfig/parser.y
@@ -557,7 +557,7 @@ static void zconf_error(const char *err, ...)
static void yyerror(const char *err)
{
- fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
+ fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno(), err);
}
static void print_quoted_string(FILE *out, const char *str)