X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8014dbe6e0e6f87b29d2e761f0ac1a0fe4d7582f..fa40abdc1d0705869a181ee3f2e9be45325d4e25:/src/mc/Session.cpp diff --git a/src/mc/Session.cpp b/src/mc/Session.cpp index d29fbeb707..f8d8819460 100644 --- a/src/mc/Session.cpp +++ b/src/mc/Session.cpp @@ -16,6 +16,7 @@ #include "xbt/system_error.hpp" #include +#include #include #ifdef __linux__ @@ -50,10 +51,7 @@ template void run_child_process(int socket, Code code) // modifying its .got.plt during snapshot. setenv("LC_BIND_NOW", "1", 1); - char buffer[64]; - int res = std::snprintf(buffer, sizeof(buffer), "%i", socket); - xbt_assert((size_t)res < sizeof(buffer) && res != -1); - setenv(MC_ENV_SOCKET_FD, buffer, 1); + setenv(MC_ENV_SOCKET_FD, std::to_string(socket).c_str(), 1); code(); }