Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Rename parameters from index to process_id in helper function
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 17 Jan 2018 20:36:52 +0000 (21:36 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 24 Jan 2018 14:58:21 +0000 (15:58 +0100)
src/smpi/internals/smpi_process.cpp

index a28de35..313324a 100644 (file)
@@ -17,15 +17,15 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_process, smpi, "Logging specific to SMPI (k
 
 #define MAILBOX_NAME_MAXLEN (5 + sizeof(int) * 2 + 1)
 
-static char *get_mailbox_name(char *str, int index)
+static char* get_mailbox_name(char* str, int process_id)
 {
-  snprintf(str, MAILBOX_NAME_MAXLEN, "SMPI-%0*x", static_cast<int>(sizeof(int) * 2), static_cast<unsigned>(index));
+  snprintf(str, MAILBOX_NAME_MAXLEN, "SMPI-%0*x", static_cast<int>(sizeof(int) * 2), static_cast<unsigned>(process_id));
   return str;
 }
 
-static char *get_mailbox_name_small(char *str, int index)
+static char* get_mailbox_name_small(char* str, int process_id)
 {
-  snprintf(str, MAILBOX_NAME_MAXLEN, "small%0*x", static_cast<int>(sizeof(int) * 2), static_cast<unsigned>(index));
+  snprintf(str, MAILBOX_NAME_MAXLEN, "small%0*x", static_cast<int>(sizeof(int) * 2), static_cast<unsigned>(process_id));
   return str;
 }