From: Gabriel Corona Date: Tue, 8 Jul 2014 13:12:00 +0000 (+0200) Subject: [mc] Use mc_snapshot_region_memcmp() in compare_areas_with_type() X-Git-Tag: v3_12~890^2~1^2~4^2~20 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5e829289d89dc08ac3b00bc7f978adfa990d3bc3 [mc] Use mc_snapshot_region_memcmp() in compare_areas_with_type() --- diff --git a/src/mc/mc_compare.cpp b/src/mc/mc_compare.cpp index bf0a7ecae3..cbaedb516c 100644 --- a/src/mc/mc_compare.cpp +++ b/src/mc/mc_compare.cpp @@ -103,12 +103,9 @@ static int compare_areas_with_type(struct mc_compare_state& state, case DW_TAG_enumeration_type: case DW_TAG_union_type: { - void* data1 = - mc_snapshot_read_region(real_area1, region1, alloca(type->byte_size), type->byte_size); - void* data2 = - mc_snapshot_read_region(real_area2, region2, alloca(type->byte_size), type->byte_size); - return (memcmp(data1, data2, type->byte_size) != 0); - break; + return mc_snapshot_region_memcmp( + real_area1, region1, real_area2, region2, + type->byte_size) != 0; } case DW_TAG_typedef: case DW_TAG_volatile_type: