summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-09 15:12:17 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-09 16:45:27 -0400
commit56c70b32af20a267c66e5e5179cc176ecf57d635 (patch)
tree89ad29ac3750ace36e1d7607f2d1e7aa9a032334 /src
parent061a237dd253653771da8a782dfefa848c096d92 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/boot/efi/boot.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
index 3f8140ebff..be314d8dfb 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;
}