Remove browse_context_init()

Prefer to use designated initializers to avoid having to specify
unneeded parameters. Non-initialized members are zero-initialized
by the compiler.

Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
This commit is contained in:
Aidan MacDonald 2022-11-30 15:17:54 +00:00
parent 701e262d3d
commit 6c52fa139c
17 changed files with 117 additions and 108 deletions

View file

@ -660,9 +660,11 @@ int do_shortcut_menu(void *ignored)
done = GO_TO_PLUGIN;
break;
}
struct browse_context browse;
browse_context_init(&browse, global_settings.dirfilter, 0,
NULL, NOICON, sc->u.path, NULL);
struct browse_context browse = {
.dirfilter = global_settings.dirfilter,
.icon = Icon_NOICON,
.root = sc->u.path,
};
if (sc->type == SHORTCUT_FILE)
browse.flags |= BROWSE_RUNFILE;
done = rockbox_browse(&browse);