diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-07-05 11:46:12 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-07-25 23:24:35 +0900 |
commit | 5accd7f3360e891bd552312515387dbaa2bb4bf3 (patch) | |
tree | d0bc381ad96ae3a69fa211fb2e9053f9d6de421e /scripts/kconfig/nconf.c | |
parent | 693359f7ac9012778590a370d076b13db704255e (diff) | |
download | linux-5accd7f3360e891bd552312515387dbaa2bb4bf3.tar.bz2 |
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.c | 7 |
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) |