Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : initialize global variable ignore_done and set its value to 0 at...
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Wed, 7 Nov 2012 14:47:43 +0000 (15:47 +0100)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Wed, 7 Nov 2012 15:59:31 +0000 (16:59 +0100)
src/xbt/mmalloc/mm_diff.c

index ab71565..4b49823 100644 (file)
@@ -121,7 +121,7 @@ void *s_heap, *heapbase1, *heapbase2;
 malloc_info *heapinfo1, *heapinfo2;
 size_t heaplimit, heapsize1, heapsize2;
 
-int ignore_done;
+int ignore_done = 0;
 
 int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stack1, xbt_dynar_t *stack2, xbt_dynar_t *equals){
 
@@ -160,8 +160,6 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
 
   int equal, res_compare;
 
-  ignore_done = 0;
-
   /* Init equal information */
   i1 = 1;
 
@@ -548,6 +546,7 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac
   XBT_DEBUG("Different blocks or fragments in heap2 : %d", nb_diff2);
 
   xbt_dynar_free(&previous);
+  ignore_done = 0;
 
   return ((nb_diff1 > 0) || (nb_diff2 > 0));