diff options
Diffstat (limited to 'common/menutree.c')
-rw-r--r-- | common/menutree.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/common/menutree.c b/common/menutree.c index c28284b47a..751350d754 100644 --- a/common/menutree.c +++ b/common/menutree.c @@ -34,14 +34,7 @@ static void menutree_action(struct menu *m, struct menu_entry *me) static void setenv_bool(const char *var, bool val) { - const char *str; - - if (val) - str = "1"; - else - str = "0"; - - setenv(var, str); + pr_setenv(var, "%d", val); } static void menutree_box(struct menu *m, struct menu_entry *me) @@ -84,10 +77,9 @@ int menutree(const char *path, int toplevel) struct stat s; char *box; struct menutree *mt; - glob_t g; + glob_t g = {}; int i; char *globpath, *display; - size_t size; menu = menu_alloc(); @@ -100,7 +92,7 @@ int menutree(const char *path, int toplevel) } globpath = basprintf("%s/title", path); - display = read_file(globpath, &size); + display = read_file(globpath, NULL); free(globpath); if (!display) { eprintf("no title found in %s/title\n", path); |