From: Christian Heinrich Date: Fri, 7 Jul 2017 15:22:12 +0000 (+0200) Subject: [SMPI] Use std::string::compare instead of strncmp X-Git-Tag: v3_17~288 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e38b14311d3182de4c7bd3b03dcdde8caa93a941 [SMPI] Use std::string::compare instead of strncmp --- diff --git a/src/smpi/internals/smpi_memory.cpp b/src/smpi/internals/smpi_memory.cpp index 9a1147f73d..4fce186361 100644 --- a/src/smpi/internals/smpi_memory.cpp +++ b/src/smpi/internals/smpi_memory.cpp @@ -108,7 +108,8 @@ void smpi_really_switch_data_segment(int dest) int smpi_is_privatization_file(char* file) { - return strncmp("/dev/shm/my-buffer-", file, std::strlen("/dev/shm/my-buffer-")) == 0; + const std::string buffer_path {"/dev/shm/my-buffer-"}; + return buffer_path.compare(file) == 0; } void smpi_initialize_global_memory_segments()