diff mbox series

kconfig: fix return value of do_error_if()

Message ID 20201219181842.178250-1-masahiroy@kernel.org (mailing list archive)
State New
Headers show
Series kconfig: fix return value of do_error_if() | expand

Commit Message

Masahiro Yamada Dec. 19, 2020, 6:18 p.m. UTC
Kconfig expands a macro to a string. $(error-if,...) should be expanded
to an empty string, not NULL.

Fixes: 1d6272e6fe43 ("kconfig: add 'info', 'warning-if', and 'error-if' built-in functions")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

 scripts/kconfig/preprocess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


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[])