Przeglądaj źródła

mpi/tests: use calloc instead of malloc to be sure memory is defined

Nathalie Furmento 9 lat temu
rodzic
commit
baa115a098
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      mpi/tests/pingpong.c

+ 2 - 2
mpi/tests/pingpong.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010, 2014-2015  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013, 2015  CNRS
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015, 2016  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
 		return STARPU_TEST_SKIPPED;
 	}
 
-	tab = malloc(SIZE*sizeof(float));
+	tab = calloc(SIZE, sizeof(float));
 
 	starpu_vector_data_register(&tab_handle, STARPU_MAIN_RAM, (uintptr_t)tab, SIZE, sizeof(float));