btrfs-progs: array indexes must be < ARRAY_SIZE()

It looks like the usual kernel idiom of "< ARRAY_SIZE()" was
accidentally negated as ">" instead of ">=".

Signed-off-by: Zach Brown <zab@redhat.com>
master
Zach Brown 2013-01-22 15:11:55 -08:00
parent 7d365c5a87
commit aaf682ac2e
1 changed files with 1 additions and 1 deletions

View File

@ -1118,7 +1118,7 @@ char *pretty_sizes(u64 size)
num_divs ++;
}
if (num_divs > ARRAY_SIZE(size_strs))
if (num_divs >= ARRAY_SIZE(size_strs))
return NULL;
fraction = (float)last_size / 1024;
}