more bugs
[model-checker.git] / nodestack.cc
index 69f0b5f513640f5861c6c3bf117c73fc440c7da6..b79863e2abbcc443e76721360724cc1c800d9b61 100644 (file)
@@ -32,11 +32,12 @@ Node::Node(ModelAction *act, Node *par, int nthreads, bool *enabled)
        if (act)
                act->set_node(this);
        enabled_array=(bool *)MYMALLOC(sizeof(bool)*num_threads);
-       if (enabled)
+       if (enabled != NULL)
                memcpy(enabled_array, enabled, sizeof(bool)*num_threads);
-       else 
+       else {
                for(int i=0;i<num_threads;i++)
                        enabled_array[i]=false;
+       }
 }
 
 /** @brief Node desctructor */
@@ -332,7 +333,7 @@ void NodeStack::print()
        printf("............................................\n");
 }
 
-ModelAction * NodeStack::explore_action(ModelAction *act, bool * enabled)
+ModelAction * NodeStack::explore_action(ModelAction *act, bool * is_enabled)
 {
        DBG();
 
@@ -347,7 +348,7 @@ ModelAction * NodeStack::explore_action(ModelAction *act, bool * enabled)
 
        /* Record action */
        get_head()->explore_child(act);
-       node_list.push_back(new Node(act, get_head(), model->get_num_threads(), enabled));
+       node_list.push_back(new Node(act, get_head(), model->get_num_threads(), is_enabled));
        total_nodes++;
        iter++;
        return NULL;