Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Replace redundant type with 'auto'.
[simgrid.git] / teshsuite / smpi / isp / umpire / no-error3.c
index 30e6e115dd46d3fdb054221c01900b38a3102704..2ed4e13e0a38081501c456fac3666e77aac37d8c 100644 (file)
@@ -33,14 +33,14 @@ main (int argc, char **argv)
   }
   else {
     if (rank == 0) {
-      memset (buf0, 0, buf_size);
+      memset (buf0, 0, buf_size*sizeof(int));
 
       MPI_Sendrecv (buf0, buf_size, MPI_INT, 1, 0,
                    buf1, buf_size, MPI_INT, 1, 0,
                    MPI_COMM_WORLD, &status);
     }
     else if (rank == 1) {
-      memset (buf1, 1, buf_size);
+      memset (buf1, 1, buf_size*sizeof(int));
 
       MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);