diff options
author | Zach Brown <zab@redhat.com> | 2013-01-22 13:58:20 -0800 |
---|---|---|
committer | Zach Brown <zab@redhat.com> | 2013-02-05 16:09:39 -0800 |
commit | fd732dd81a698c90387a3611134e5fffec07411b (patch) | |
tree | de1808c71a2d4b79c50b5f896a2592ab02365c97 | |
parent | 7c9f323a7c9c7a0d7b516ed9974308bde4017ae2 (diff) |
btrfs-progs: impossible BUG_ON meant to test empty
old_left_nritems is unsigned so BUG_ON(old_left_nritems < 0) is
impossible. Presumably the BUG_ON() meant to test that it wasn't 0 so
that btrfs_item_offset_nr() doesn't get a nr of -1.
Signed-off-by: Zach Brown <zab@redhat.com>
-rw-r--r-- | ctree.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1960,7 +1960,7 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root btrfs_item_offset_nr(right, push_items - 1), push_space); old_left_nritems = btrfs_header_nritems(left); - BUG_ON(old_left_nritems < 0); + BUG_ON(old_left_nritems == 0); old_left_item_size = btrfs_item_offset_nr(left, old_left_nritems - 1); for (i = old_left_nritems; i < old_left_nritems + push_items; i++) { |