From 6c52fa139c5ad8f78ed4fdb306a6074228dbf4c9 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Wed, 30 Nov 2022 15:17:54 +0000 Subject: 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 --- apps/shortcuts.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'apps/shortcuts.c') diff --git a/apps/shortcuts.c b/apps/shortcuts.c index 82e4a359bf..3f13d0c1b3 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c @@ -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); -- cgit v1.2.3