summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/gui/list.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 66c3438574..e05e44008b 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -95,11 +95,9 @@ static int list_line_height(const struct viewport *vp)
static void list_init_viewports(struct gui_synclist *list)
{
- int parent_used;
+ bool parent_used = (*list->parent == &parent[SCREEN_MAIN]);
- parent_used = (*list->parent != &parent[SCREEN_MAIN]);
-
- if (!parent_used)
+ if (parent_used)
{
FOR_NB_SCREENS(i)
{