From: Masahiro Yamada Date: Sat, 19 Dec 2020 18:18:42 +0000 (+0900) Subject: kconfig: fix return value of do_error_if() X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=0cdadf2ba711b68b80be400673acb9fe6ab1c650;p=carl9170fw.git 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 Signed-off-by: Christian Lamparter --- diff --git a/config/preprocess.c b/config/preprocess.c index 0243086..0590f86 100644 --- a/config/preprocess.c +++ b/config/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[])