Commit 135b4957 authored by Masahiro Yamada's avatar Masahiro Yamada

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: 1d6272e6 ("kconfig: add 'info', 'warning-if', and 'error-if' built-in functions")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 78cb0907
...@@ -114,7 +114,7 @@ static char *do_error_if(int argc, char *argv[]) ...@@ -114,7 +114,7 @@ static char *do_error_if(int argc, char *argv[])
if (!strcmp(argv[0], "y")) if (!strcmp(argv[0], "y"))
pperror("%s", argv[1]); pperror("%s", argv[1]);
return NULL; return xstrdup("");
} }
static char *do_filename(int argc, char *argv[]) static char *do_filename(int argc, char *argv[])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment