diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-12-20 03:18:42 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2020-12-21 14:48:54 +0900 |
commit | 135b4957eac43af2aedf8e2a277b9540f33c2558 (patch) | |
tree | ecb447501d59bc5d6a727869d51b1bfdc90793f1 /scripts/kconfig | |
parent | 78cb09078352d032b12e2af7feb9b5b7f0fa794c (diff) |
kconfig: fix return value of do_error_if()
$(error-if,...) is expanded to an empty string. Currently, it relies on
eval_clause() returning xstrdup("") when all attempts for expansion fail,
but the correct implementation is to make do_error_if() return xstrdup("").
Fixes: 1d6272e6fe43 ("kconfig: add 'info', 'warning-if', and 'error-if' built-in functions")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/preprocess.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index 0243086fb168..0590f86df6e4 100644 --- a/scripts/kconfig/preprocess.c +++ b/scripts/kconfig/preprocess.c @@ -114,7 +114,7 @@ static char *do_error_if(int argc, char *argv[]) if (!strcmp(argv[0], "y")) pperror("%s", argv[1]); - return NULL; + return xstrdup(""); } static char *do_filename(int argc, char *argv[]) |