From 185e1af39be47002d4c7b1f71b1b7e8cda88aa8a Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Mon, 3 Oct 2022 21:41:39 +0200 Subject: [PATCH] (MaterialUI) Prevent pointless self-assignment with tertiary operators --- menu/drivers/materialui.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 4c7906f07f..fa2620217d 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -4244,14 +4244,14 @@ static void materialui_render_menu_entry_default( (size_t)(entry_value_width_max / mui->font_data.list.glyph_width); /* Limit length of value string */ - entry_value_len_max = (entry_value_len_max > 0) ? - entry_value_len_max - 1 : entry_value_len_max; - entry_value_len = (entry_value_len > entry_value_len_max) ? - entry_value_len_max : entry_value_len; + if (entry_value_len_max > 0) + entry_value_len_max = entry_value_len_max - 1; + if (entry_value_len > entry_value_len_max) + entry_value_len = entry_value_len_max; - mui->ticker.s = value_buf; - mui->ticker.len = entry_value_len; - mui->ticker.str = entry_value; + mui->ticker.s = value_buf; + mui->ticker.len = entry_value_len; + mui->ticker.str = entry_value; gfx_animation_ticker(&mui->ticker);