From: Zbigniew Jędrzejewski-Szmek Date: Mon, 9 Mar 2015 19:12:17 +0000 (-0400) Subject: boot/efi: do not assign variable twice X-Git-Tag: v219.0~433 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=56c70b32af20a267c66e5e5179cc176ecf57d635;p=elogind.git boot/efi: do not assign variable twice If the highlighted line did not move outside of the visible region, it should not be necessary to update idx_last. CID #1287137, #1287138. --- diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 3f8140ebf..be314d8df 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -809,15 +809,12 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load idx_last = idx_highlight; idx_first = 1 + idx_highlight - visible_max; refresh = TRUE; - } - if (idx_highlight < idx_first) { + } else if (idx_highlight < idx_first) { idx_first = idx_highlight; idx_last = idx_highlight + visible_max-1; refresh = TRUE; } - idx_last = idx_first + visible_max-1; - if (!refresh && idx_highlight != idx_highlight_prev) highlight = TRUE; }