From 0cdadf2ba711b68b80be400673acb9fe6ab1c650 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 20 Dec 2020 03:18:42 +0900 Subject: [PATCH] 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 --- config/preprocess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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[]) -- 2.31.1