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/plugins/rockpaint.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'apps/plugins/rockpaint.c') diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index 09fa2c8c5f..cba1701eb6 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c @@ -1084,15 +1084,15 @@ static bool callback_show_item(char *name, int attr, struct tree_context *tc) static bool browse( char *dst, int dst_size, const char *start ) { - struct browse_context browse; - - rb->browse_context_init(&browse, SHOW_ALL, - BROWSE_SELECTONLY|BROWSE_NO_CONTEXT_MENU, - NULL, NOICON, start, NULL); - - browse.callback_show_item = callback_show_item; - browse.buf = dst; - browse.bufsize = dst_size; + struct browse_context browse = { + .dirfilter = SHOW_ALL, + .flags = BROWSE_SELECTONLY | BROWSE_NO_CONTEXT_MENU, + .icon = Icon_NOICON, + .root = start, + .buf = dst, + .bufsize = dst_size, + .callback_show_item = callback_show_item, + }; rb->rockbox_browse(&browse); -- cgit v1.2.3