]> git.ozlabs.org Git - petitboot/commitdiff
ncurses/nc-cui: musl libc fixes
authorBrett Grandbois <brett.grandbois@opengear.com>
Mon, 5 Feb 2018 20:40:29 +0000 (06:40 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Wed, 7 Feb 2018 21:01:34 +0000 (08:01 +1100)
add missing #inlcude <locale.h>

musl libc can segfault with a NULL format string so need to add a
redundant "%s", "" to keep it happy

Signed-off-by: Brett Grandbois <brett.grandbois@opengear.com>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
ui/ncurses/nc-cui.c

index f9f82475166961659a232dedc305ba4411158643..ee6df87b0c7d0a00f305a6460235d3b7215d93b3 100644 (file)
@@ -24,6 +24,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <locale.h>
 #include <string.h>
 #include <sys/ioctl.h>
 #include <sys/reboot.h>
 #include <string.h>
 #include <sys/ioctl.h>
 #include <sys/reboot.h>
@@ -1334,7 +1335,7 @@ static struct pmenu *plugin_menu_init(struct cui *cui)
 
        m = pmenu_init(cui, 2, cui_plugin_menu_exit);
        m->scr.frame.ltitle = talloc_asprintf(m, _("Petitboot Plugins"));
 
        m = pmenu_init(cui, 2, cui_plugin_menu_exit);
        m->scr.frame.ltitle = talloc_asprintf(m, _("Petitboot Plugins"));
-       m->scr.frame.rtitle = talloc_asprintf(m, NULL);
+       m->scr.frame.rtitle = talloc_asprintf(m, "%s", "");
        m->scr.frame.help = talloc_strdup(m,
                _("Enter=install, e=details, x=exit, h=help"));
        m->scr.frame.status = talloc_asprintf(m,
        m->scr.frame.help = talloc_strdup(m,
                _("Enter=install, e=details, x=exit, h=help"));
        m->scr.frame.status = talloc_asprintf(m,