[PATCH] cleanup linearize_cond_branch()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No functional changes here, just some more consistency:
* systematically use break instead of 'return VOID'
* remove some superfluous curlies
* remove some unneeded blank lines

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 linearize.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/linearize.c b/linearize.c
index 1081bda86425..978d1e415fe1 100644
--- a/linearize.c
+++ b/linearize.c
@@ -1795,37 +1795,30 @@ static pseudo_t linearize_cond_branch(struct entrypoint *ep, struct expression *
 	case EXPR_STRING:
 	case EXPR_VALUE:
 		add_goto(ep, expr->value ? bb_true : bb_false);
-		return VOID;
-
+		break;
 	case EXPR_FVALUE:
 		add_goto(ep, expr->fvalue ? bb_true : bb_false);
-		return VOID;
-		
+		break;
 	case EXPR_LOGICAL:
 		linearize_logical_branch(ep, expr, bb_true, bb_false);
-		return VOID;
-
+		break;
 	case EXPR_COMPARE:
 		cond = linearize_compare(ep, expr);
 		add_branch(ep, cond, bb_true, bb_false);
 		break;
-		
 	case EXPR_PREOP:
 		if (expr->op == '!')
 			return linearize_cond_branch(ep, expr->unop, bb_false, bb_true);
 		/* fall through */
-	default: {
+	default:
 		cond = linearize_expression_to_bool(ep, expr);
 		add_branch(ep, cond, bb_true, bb_false);
-
-		return VOID;
-	}
+		break;
 	}
 	return VOID;
 }
 
 
-	
 static pseudo_t linearize_logical_branch(struct entrypoint *ep, struct expression *expr, struct basic_block *bb_true, struct basic_block *bb_false)
 {
 	struct basic_block *next = alloc_basic_block(ep, expr->pos);
-- 
2.28.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux