* [PATCH] kconfig: fix return value of do_error_if()
@ 2020-12-19 18:18 Masahiro Yamada
0 siblings, 0 replies; only message in thread
From: Masahiro Yamada @ 2020-12-19 18:18 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, Kees Cook, linux-kernel
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 --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[])
--
2.27.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-19 18:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-19 18:18 [PATCH] kconfig: fix return value of do_error_if() Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.