]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] reiserfs patchset, patch 6 of 9 06-return_braindamage_removal.diff
authorHans Reiser <reiser@namesys.com>
Tue, 5 Feb 2002 09:10:57 +0000 (01:10 -0800)
committerLinus Torvalds <torvalds@athlon.transmeta.com>
Tue, 5 Feb 2002 09:10:57 +0000 (01:10 -0800)
06-return_braindamage_removal.diff
    Kill stupid code like 'goto label ; return 1;'

fs/reiserfs/fix_node.c

index f2f2754caf66ebef25e7de2a61b184a4049481b4..5444f25fef1209e226045d4aa00cdb6d09eb22d4 100644 (file)
@@ -2356,7 +2356,6 @@ int fix_nodes (int n_op_mode,
     for ( n_h = 0; n_h < MAX_HEIGHT && p_s_tb->insert_size[n_h]; n_h++ ) { 
        if ( (n_ret_value = get_direct_parent(p_s_tb, n_h)) != CARRY_ON ) {
            goto repeat;
-           return n_ret_value;
        }
 
        if ( (n_ret_value = check_balance (n_op_mode, p_s_tb, n_h, n_item_num,
@@ -2365,7 +2364,6 @@ int fix_nodes (int n_op_mode,
                /* No balancing for higher levels needed. */
                if ( (n_ret_value = get_neighbors(p_s_tb, n_h)) != CARRY_ON ) {
                    goto repeat;
-                   return n_ret_value;
                }
                if ( n_h != MAX_HEIGHT - 1 )  
                    p_s_tb->insert_size[n_h + 1] = 0;
@@ -2373,17 +2371,14 @@ int fix_nodes (int n_op_mode,
                break;
            }
            goto repeat;
-           return n_ret_value;
        }
 
        if ( (n_ret_value = get_neighbors(p_s_tb, n_h)) != CARRY_ON ) {
            goto repeat;
-           return n_ret_value;
        }
 
        if ( (n_ret_value = get_empty_nodes(p_s_tb, n_h)) != CARRY_ON ) {
-           goto repeat;
-           return n_ret_value; /* No disk space, or schedule occurred and
+           goto repeat;        /* No disk space, or schedule occurred and
                                   analysis may be invalid and needs to be redone. */
        }