aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linearize.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-03-29 18:22:50 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-03-19 23:56:44 +0100
commit26353a45ce03553c176cab553c3df36844e439fc (patch)
tree3aa100882b875ead9d29b14c9868278416a1aa8a /linearize.c
parent52f02114bad02a2a705ecc3fe5904ff449196f50 (diff)
downloadsparse-dev-26353a45ce03553c176cab553c3df36844e439fc.tar.gz
remove insert_branch() redundant arg
insert_branch()'s first argument must be the BB of the instruction given in the second argument. So, remove it from the argument and simply use insn->bb instead. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'linearize.c')
-rw-r--r--linearize.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linearize.c b/linearize.c
index 7248fa56..ebb03217 100644
--- a/linearize.c
+++ b/linearize.c
@@ -700,8 +700,9 @@ static void remove_parent(struct basic_block *child, struct basic_block *parent)
}
/* Change a "switch" or a conditional branch into a branch */
-void insert_branch(struct basic_block *bb, struct instruction *jmp, struct basic_block *target)
+void insert_branch(struct instruction *jmp, struct basic_block *target)
{
+ struct basic_block *bb = jmp->bb;
struct instruction *br, *old;
struct basic_block *child;