summaryrefslogtreecommitdiff
path: root/scripts/kconfig/nconf.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-05 05:46:12 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-25 17:24:35 +0300
commit5accd7f3360e891bd552312515387dbaa2bb4bf3 (patch)
treed0bc381ad96ae3a69fa211fb2e9053f9d6de421e /scripts/kconfig/nconf.c
parent693359f7ac9012778590a370d076b13db704255e (diff)
downloadlinux-5accd7f3360e891bd552312515387dbaa2bb4bf3.tar.xz
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 <yamada.masahiro@socionext.com> Reviewed-by: Dirk Gouders <dirk@gouders.net>
Diffstat (limited to 'scripts/kconfig/nconf.c')
-rw-r--r--scripts/kconfig/nconf.c7
1 files changed, 2 insertions, 5 deletions
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, "<OK>");
+ btn_dialog(main_window, s, 1, "<OK>");
}
static void show_help(struct menu *menu)