summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2014-06-03 13:29:19 +0200
committerDavid Sterba <dsterba@suse.cz>2014-11-18 18:25:58 +0100
commit5bfc3fea8188ca013881299c1a50d3e6402fc7be (patch)
tree061615fe1d3601311c8d395f93670f3c64776bd8 /cmds-restore.c
parent5ebf59ff5852dd4f37d99ab4e49fef1c579d6665 (diff)
downloadbtrfs-progs-5bfc3fea8188ca013881299c1a50d3e6402fc7be.tar.gz
btrfs-progs: fix compiler warning
gcc 4.9.0 gives a warning: array subscript is above array bounds Checking for "greater or equal" instead of just "equal" fixes this. The warning is a false positive, appears with -ftree-vrp, but we'd rather fix it to avoid noise during build. http://www.mail-archive.com/linux-btrfs%40vger.kernel.org/msg34338.html Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r--cmds-restore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index b52d5c8..2f9b72d 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -176,7 +176,7 @@ again:
break;
}
- if (level == BTRFS_MAX_LEVEL)
+ if (level >= BTRFS_MAX_LEVEL)
return 1;
slot = path->slots[level] + 1;