summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2008-11-25 17:24:23 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-11-25 17:24:23 -0500
commit25f1ee3aba17584ba4810da892175acab7fff9c8 (patch)
treee05da5e03396a3660f71df07bcbedb3023f4b6a4 /fs/ext4
parent565a9617b2151e21b22700e97a8b04e70e103153 (diff)
downloadop-kernel-dev-25f1ee3aba17584ba4810da892175acab7fff9c8.zip
op-kernel-dev-25f1ee3aba17584ba4810da892175acab7fff9c8.tar.gz
ext4: fix build warning
Replace `if' with `goto' to assure gcc that ix has been initialized. Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/extents.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 59401d0..0917be5 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1160,15 +1160,13 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
while (--depth >= 0) {
ix = path[depth].p_idx;
if (ix != EXT_LAST_INDEX(path[depth].p_hdr))
- break;
+ goto got_index;
}
- if (depth < 0) {
- /* we've gone up to the root and
- * found no index to the right */
- return 0;
- }
+ /* we've gone up to the root and found no index to the right */
+ return 0;
+got_index:
/* we've found index to the right, let's
* follow it and find the closest allocated
* block to the right */
@@ -1201,7 +1199,6 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path,
*phys = ext_pblock(ex);
put_bh(bh);
return 0;
-
}
/*
OpenPOWER on IntegriCloud