]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/smpi/auto-shared/auto-shared.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / teshsuite / smpi / auto-shared / auto-shared.c
index 8966cc8f1a3685312ea7050584be418f3b2a53dc..9bc350f5b7e6a1dfec697f73352ea4d318268470 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2019. The SimGrid Team.
+/* Copyright (c) 2009-2021. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -33,7 +33,7 @@ int main(int argc, char *argv[])
   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
   MPI_Comm_size(MPI_COMM_WORLD, &size);
   //Let's Allocate a memory buffer
-  uint64_t* buf = malloc(sizeof(uint64_t));
+  uint64_t* buf = calloc(1, sizeof(uint64_t));
   //one writes data in it
   if(rank==0){
     *buf=size;