From: Gabriel Corona Date: Thu, 19 Jun 2014 10:27:31 +0000 (+0200) Subject: [mc] Replace test-and-die with assert X-Git-Tag: v3_12~956^2~1^2~24 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a12357f20521b24d3febc9cac4cfbb8b707b175a?ds=sidebyside [mc] Replace test-and-die with assert --- diff --git a/src/mc/mc_snapshot.c b/src/mc/mc_snapshot.c index 20d7642d1c..c3eb07ce29 100644 --- a/src/mc/mc_snapshot.c +++ b/src/mc/mc_snapshot.c @@ -102,9 +102,8 @@ void* mc_snapshot_read_region(void* addr, mc_mem_region_t region, void* target, { uintptr_t offset = (uintptr_t) addr - (uintptr_t) region->start_addr; - if (addr < region->start_addr || (char*) addr+size >= (char*)region->start_addr+region->size) { - xbt_die("Trying to read out of the region boundary."); - } + xbt_assert(addr >= region->start_addr && (char*) addr+size < (char*)region->start_addr+region->size, + "Trying to read out of the region boundary."); // Linear memory region: if (region->data) {