Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use strncpy instead of strcpy to please sonar
[simgrid.git] / teshsuite / smpi / isp / umpire / any_src-can-deadlock8.c
index 0d2280845d743d7884afb0a1f90a8c4876186828..14c48311cb33bdb5e917788f1f2174e4399bbe3b 100644 (file)
@@ -56,7 +56,7 @@ main (int argc, char **argv)
     }
   else if (rank == 2)
     {
     }
   else if (rank == 2)
     {
-      memset (buf0, 0, buf_size);
+      memset (buf0, 0, buf_size*sizeof(int));
 
   //    sleep (30);
 
 
   //    sleep (30);
 
@@ -68,7 +68,7 @@ main (int argc, char **argv)
     }
   else if (rank == 1)
     {
     }
   else if (rank == 1)
     {
-      memset (buf1, 1, buf_size);
+      memset (buf1, 1, buf_size*sizeof(int));
 
       MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
     }
 
       MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
     }