Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] s/NULL/nullptr.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 5 Dec 2020 10:22:24 +0000 (11:22 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 5 Dec 2020 10:22:24 +0000 (11:22 +0100)
examples/smpi/ampi_test/ampi_test.cpp

index 696f27a..e3a8cf4 100644 (file)
@@ -13,9 +13,9 @@ int main(int argc, char* argv[])
   // useless alocations for testing and coverage
   void* pointer = malloc(100 * sizeof(int));
   void* ptmp;
-  if ((ptmp = realloc(pointer, 50 * sizeof(int))) != NULL)
+  if ((ptmp = realloc(pointer, 50 * sizeof(int))) != nullptr)
     pointer = ptmp;
-  if ((ptmp = realloc(pointer, 200 * sizeof(int))) != NULL)
+  if ((ptmp = realloc(pointer, 200 * sizeof(int))) != nullptr)
     pointer = ptmp;
   free(pointer);
   pointer = calloc(100, sizeof(int));