Skip to contentSkip to conversation

kconfig: fix return value of do_error_if()

PATCH New Masahiro Yamada 1 participant 1 message Dec 19, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kconfig: fix return value of do_error_if()

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")

---

 scripts/kconfig/preprocess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/preprocess.c +1 -1
index 0243086fb168..0590f86df6e4 100644
@@ -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[])
Signature · 1 line
2.27.0