Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Initialize arrays at declaration, and remove use of deprecated bzero().
[simgrid.git] / src / smpi / instr_smpi.c
index 62a0d65..4bb6e41 100644 (file)
@@ -271,8 +271,7 @@ void TRACE_smpi_send(int rank, int src, int dst, int size)
 {
   if (!TRACE_smpi_is_enabled()) return;
 
-  char key[INSTR_DEFAULT_STR_SIZE];
-  bzero (key, INSTR_DEFAULT_STR_SIZE);
+  char key[INSTR_DEFAULT_STR_SIZE] = {0};
   TRACE_smpi_put_key(src, dst, key, INSTR_DEFAULT_STR_SIZE);
 
   char str[INSTR_DEFAULT_STR_SIZE];
@@ -287,8 +286,7 @@ void TRACE_smpi_recv(int rank, int src, int dst)
 {
   if (!TRACE_smpi_is_enabled()) return;
 
-  char key[INSTR_DEFAULT_STR_SIZE];
-  bzero (key, INSTR_DEFAULT_STR_SIZE);
+  char key[INSTR_DEFAULT_STR_SIZE] = {0};
   TRACE_smpi_get_key(src, dst, key, INSTR_DEFAULT_STR_SIZE);
 
   char str[INSTR_DEFAULT_STR_SIZE];