Skip to content

Commit

Permalink
fix RMFS bug
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymityStudent committed Oct 23, 2015
1 parent 910ece7 commit 682158e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/mutators/memory_c/RMFS/remove_free_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ static gboolean mutator_milu_remove_free_statement_node_checking(ASTNode * node)

static gboolean mutator_milu_remove_free_statement_mutate(ASTNode * node, gint type)
{
ASTNode * child;
ASTNode * child, *replace;
switch(type)
{
case 1:
child=node->children;
child->parent=NULL;
child->next_sibling->parent=NULL;
child=node->children->next_sibling;
replace=ASTNode_new_integer_literal_node("0");
tmpNode=child;
ASTNode_set_null_statement(node);
replace_subtree_with(child, replace);
return TRUE;

default:
Expand All @@ -74,6 +73,6 @@ static gboolean mutator_milu_remove_free_statement_mutate(ASTNode * node, gint t

static gboolean mutator_milu_remove_free_statement_clean(ASTNode * node, gint type)
{
ASTNode_restore_free_statement(node, tmpNode);
replace_subtree_with(node->children->next_sibling, tmpNode);
return TRUE;
}

0 comments on commit 682158e

Please sign in to comment.