Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move fucntion call out of xbt_assert.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 19 Oct 2020 11:45:59 +0000 (13:45 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 19 Oct 2020 11:45:59 +0000 (13:45 +0200)
src/smpi/internals/smpi_global.cpp

index 1c23f4c..73413f5 100644 (file)
@@ -481,7 +481,8 @@ static void smpi_init_privatization_dlopen(const std::string& executable)
           smpi_copy_file(libpath, target_lib, fdin_size2);
 
           std::string sedcommand = "sed -i -e 's/" + libname + "/" + target_lib + "/g' " + target_executable;
-          xbt_assert(system(sedcommand.c_str()) == 0, "error while applying sed command %s \n", sedcommand.c_str());
+          int status             = system(sedcommand.c_str());
+          xbt_assert(status == 0, "error while applying sed command %s \n", sedcommand.c_str());
         }
       }