]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ext4: fix build warning
authorWu Fengguang <fengguang.wu@intel.com>
Tue, 25 Nov 2008 22:24:23 +0000 (17:24 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 25 Nov 2008 22:24:23 +0000 (17:24 -0500)
Replace `if' with `goto' to assure gcc that ix has been initialized.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
fs/ext4/extents.c

index 59401d057c69f3a96003038e0819ee7040b147cc..0917be51f10260f92f43cbb556d8a413dc2e5d97 100644 (file)
@@ -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;
-
 }
 
 /*