Commit 2a78672f authored by Hans Reiser's avatar Hans Reiser Committed by Linus Torvalds

[PATCH] reiserfs patchset, patch 6 of 9 06-return_braindamage_removal.diff

06-return_braindamage_removal.diff
    Kill stupid code like 'goto label ; return 1;'
parent 88e3e05d
...@@ -2356,7 +2356,6 @@ int fix_nodes (int n_op_mode, ...@@ -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++ ) { 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 ) { if ( (n_ret_value = get_direct_parent(p_s_tb, n_h)) != CARRY_ON ) {
goto repeat; goto repeat;
return n_ret_value;
} }
if ( (n_ret_value = check_balance (n_op_mode, p_s_tb, n_h, n_item_num, 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, ...@@ -2365,7 +2364,6 @@ int fix_nodes (int n_op_mode,
/* No balancing for higher levels needed. */ /* No balancing for higher levels needed. */
if ( (n_ret_value = get_neighbors(p_s_tb, n_h)) != CARRY_ON ) { if ( (n_ret_value = get_neighbors(p_s_tb, n_h)) != CARRY_ON ) {
goto repeat; goto repeat;
return n_ret_value;
} }
if ( n_h != MAX_HEIGHT - 1 ) if ( n_h != MAX_HEIGHT - 1 )
p_s_tb->insert_size[n_h + 1] = 0; p_s_tb->insert_size[n_h + 1] = 0;
...@@ -2373,17 +2371,14 @@ int fix_nodes (int n_op_mode, ...@@ -2373,17 +2371,14 @@ int fix_nodes (int n_op_mode,
break; break;
} }
goto repeat; goto repeat;
return n_ret_value;
} }
if ( (n_ret_value = get_neighbors(p_s_tb, n_h)) != CARRY_ON ) { if ( (n_ret_value = get_neighbors(p_s_tb, n_h)) != CARRY_ON ) {
goto repeat; goto repeat;
return n_ret_value;
} }
if ( (n_ret_value = get_empty_nodes(p_s_tb, n_h)) != CARRY_ON ) { if ( (n_ret_value = get_empty_nodes(p_s_tb, n_h)) != CARRY_ON ) {
goto repeat; goto repeat; /* No disk space, or schedule occurred and
return n_ret_value; /* No disk space, or schedule occurred and
analysis may be invalid and needs to be redone. */ analysis may be invalid and needs to be redone. */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment