Fix error in determining the next available boot slot.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2018-01-12 15:30:48 +00:00
parent 7023544aec
commit 018caaaed0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327877

View file

@ -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;