Sfoglia il codice sorgente

Do not let people imagine that these are not pointers

Samuel Thibault 5 anni fa
parent
commit
d8eed7a430
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      examples/interface/complex_interface.c

+ 5 - 5
examples/interface/complex_interface.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2012,2013                                Inria
  * Copyright (C) 2012-2015,2017,2018,2019                 CNRS
- * Copyright (C) 2012-2015,2018                           Université de Bordeaux
+ * Copyright (C) 2012-2015,2018-2019                      Université de Bordeaux
  *
  * 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
@@ -73,8 +73,8 @@ static void complex_register_data_handle(starpu_data_handle_t handle, unsigned h
 		}
 		else
 		{
-			local_interface->real = 0;
-			local_interface->imaginary = 0;
+			local_interface->real = NULL;
+			local_interface->imaginary = NULL;
 		}
 	}
 }
@@ -83,8 +83,8 @@ static starpu_ssize_t complex_allocate_data_on_node(void *data_interface, unsign
 {
 	struct starpu_complex_interface *complex_interface = (struct starpu_complex_interface *) data_interface;
 
-	double *addr_real = 0;
-	double *addr_imaginary = 0;
+	double *addr_real = NULL;
+	double *addr_imaginary = NULL;
 	starpu_ssize_t requested_memory = complex_interface->nx * sizeof(complex_interface->real[0]);
 
 	addr_real = (double*) starpu_malloc_on_node(node, requested_memory);