Skip to content

Commit

Permalink
ext4: fix build warning
Browse files Browse the repository at this point in the history
Replace `if' with `goto' to assure gcc that ix has been initialized.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
  • Loading branch information
Wu Fengguang authored and Theodore Ts'o committed Nov 25, 2008
1 parent 565a961 commit 25f1ee3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;

}

/*
Expand Down

0 comments on commit 25f1ee3

Please sign in to comment.