aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-01-12 15:30:48 +0000
committerWarner Losh <imp@FreeBSD.org>2018-01-12 15:30:48 +0000
commit018caaaed086305be9579845c303c4e00173093d (patch)
treebb9ea6298fae1985c9312bc6ac06456c332b6fe1
parent7023544aec63e02cbea83be19336f58202b7e21c (diff)
downloadsrc-018caaaed086305be9579845c303c4e00173093d.tar.gz
src-018caaaed086305be9579845c303c4e00173093d.zip
Fix error in determining the next available boot slot.
Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=327877
-rw-r--r--usr.sbin/efibootmgr/efibootmgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c
index 9d02e642d7b3..d4253975ec7f 100644
--- a/usr.sbin/efibootmgr/efibootmgr.c
+++ b/usr.sbin/efibootmgr/efibootmgr.c
@@ -563,7 +563,7 @@ make_next_boot_var_name(void)
} else {
/* now just run the list looking for the first hole */
for (i = 0; i < cnt - 1 && next_free == 0; i++)
- if (vals[i] != vals[i + 1] + 1)
+ if (vals[i] + 1 != vals[i + 1])
next_free = vals[i] + 1;
if (next_free == 0)
next_free = vals[cnt - 1] + 1;