From 5accd7f3360e891bd552312515387dbaa2bb4bf3 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 5 Jul 2018 11:46:12 +0900 Subject: kconfig: handle format string before calling conf_message_callback() As you see in mconf.c and nconf.c, conf_message_callback() hooks are likely to end up with the boilerplate of vsnprintf(). Process the string format before calling conf_message_callback() so that it receives a simple string. Signed-off-by: Masahiro Yamada Reviewed-by: Dirk Gouders --- scripts/kconfig/nconf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'scripts/kconfig/nconf.c') diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index 97b78445584b..5cbdb92e11b3 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -1210,12 +1210,9 @@ static void conf(struct menu *menu) } } -static void conf_message_callback(const char *fmt, va_list ap) +static void conf_message_callback(const char *s) { - char buf[1024]; - - vsnprintf(buf, sizeof(buf), fmt, ap); - btn_dialog(main_window, buf, 1, ""); + btn_dialog(main_window, s, 1, ""); } static void show_help(struct menu *menu) -- cgit