Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] s/NULL/nullptr/
[simgrid.git] / src / mc / mc_compare.cpp
index daf84c8..4c1e7df 100644 (file)
@@ -13,7 +13,6 @@
 #include <xbt/sysdep.h>
 
 #include "src/internal_config.h"
-#include "src/mc/mc_object_info.h"
 #include "src/mc/mc_safety.h"
 #include "src/mc/mc_liveness.h"
 #include "src/mc/mc_private.h"
@@ -157,9 +156,9 @@ static int compare_areas_with_type(ComparisonState& state,
       return (addr_pointed1 != addr_pointed2);
     } else {
 
-      if (addr_pointed1 == NULL && addr_pointed2 == NULL)
+      if (addr_pointed1 == nullptr && addr_pointed2 == NULL)
         return 0;
-      if (addr_pointed1 == NULL || addr_pointed2 == NULL)
+      if (addr_pointed1 == nullptr || addr_pointed2 == NULL)
         return 1;
       if (!state.compared_pointers.insert(
           std::make_pair(addr_pointed1, addr_pointed2)).second)
@@ -180,7 +179,7 @@ static int compare_areas_with_type(ComparisonState& state,
           return 1;
         // The pointers are both in the heap:
         return compare_heap_area(process_index, addr_pointed1, addr_pointed2, snapshot1,
-                                 snapshot2, NULL, type->subtype, pointer_level);
+                                 snapshot2, nullptr, type->subtype, pointer_level);
       }
 
       // The pointers are both in the current object R/W segment:
@@ -440,11 +439,11 @@ int snapshot_compare(void *state1, void *state2)
   xbt_mheap_t heap1 = (xbt_mheap_t)s1->read_bytes(
     alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
     remote(process->heap_address),
-    simgrid::mc::ProcessIndexMissing, simgrid::mc::AddressSpace::Lazy);
+    simgrid::mc::ProcessIndexMissing, simgrid::mc::ReadOptions::lazy());
   xbt_mheap_t heap2 = (xbt_mheap_t)s2->read_bytes(
     alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
     remote(process->heap_address),
-    simgrid::mc::ProcessIndexMissing, simgrid::mc::AddressSpace::Lazy);
+    simgrid::mc::ProcessIndexMissing, simgrid::mc::ReadOptions::lazy());
   res_init = init_heap_information(heap1, heap2, &s1->to_ignore, &s2->to_ignore);
   if (res_init == -1) {
 #ifdef MC_DEBUG
@@ -520,7 +519,8 @@ int snapshot_compare(void *state1, void *state2)
 
     /* Compare global variables */
     is_diff =
-      compare_global_variables(region1->object_info(  ), simgrid::mc::AddressSpace::Normal,
+      compare_global_variables(region1->object_info(),
+        simgrid::mc::ProcessIndexDisabled,
         region1, region2,
         s1, s2);