Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Address a few "null dereference" warnings from fbinfer.
[simgrid.git] / teshsuite / smpi / replay-ti-colls / replay-ti-colls.c
index b7d24b0..ff300cb 100644 (file)
@@ -1,4 +1,5 @@
 #include "mpi.h"
+#include <assert.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -8,6 +9,7 @@
 static void setup_recvbuf(int nprocs, int** recvbuf, int** displs, int** counts, int** rcounts)
 {
   *recvbuf = malloc(BUFSIZE * nprocs * sizeof(int));
+  assert(*recvbuf != NULL);
   for (int i = 0; i < BUFSIZE * nprocs; i++)
     (*recvbuf)[i] = i;