Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the storage content update after a write action + remove useless loop
[simgrid.git] / src / mc / mc_compare.c
index 1007083..3cb30bf 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) 2012-2013 Da SimGrid Team. All rights reserved.            */
+/* Copyright (c) 2012-2013. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -180,7 +181,7 @@ static int compare_areas_with_type(void *area1, void *area2, xbt_dict_t types, x
         res = compare_areas_with_type((char *)area1 + (i*elm_size), (char *)area2 + (i*elm_size), other_types, types, type->dw_type_id, region_size, region_type, start_data, pointer_level);
       else
         res = compare_areas_with_type((char *)area1 + (i*elm_size), (char *)area2 + (i*elm_size), types, other_types, type->dw_type_id, region_size, region_type, start_data, pointer_level);
-      if(res != 0)
+      if(res == 1)
         return res;
     }
     break;
@@ -207,9 +208,9 @@ static int compare_areas_with_type(void *area1, void *area2, xbt_dict_t types, x
         if(type->dw_type_id == NULL)
           return  (addr_pointed1 != addr_pointed2);
         else
-          return compare_areas_with_type(addr_pointed1, addr_pointed2, types, other_types, type->dw_type_id, region_size, region_type, start_data, pointer_level); 
+          return  compare_areas_with_type(addr_pointed1, addr_pointed2, types, other_types, type->dw_type_id, region_size, region_type, start_data, pointer_level); 
       }else{
-        return  (addr_pointed1 != addr_pointed2);
+        return (addr_pointed1 != addr_pointed2);
       }
     }
     break;