Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fixing codacy warnings on multi-core VM tests + using a dedicated platform file for...
[simgrid.git] / examples / msg / app-chainsend / iterator.c
index e36ab5d..a6f7e44 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2012, 2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -27,11 +26,10 @@ xbt_dynar_iterator_t xbt_dynar_iterator_new(xbt_dynar_t list, xbt_dynar_t (*crit
 /* Returns the next element iterated by iterator it, NULL if there are no more elements */
 void *xbt_dynar_iterator_next(xbt_dynar_iterator_t it)
 {
-  int *next;
   if (it->current >= it->length) {
     return NULL;
   } else {
-    next = xbt_dynar_get_ptr(it->indices_list, it->current);
+    int* next = xbt_dynar_get_ptr(it->indices_list, it->current);
     it->current++;
     return xbt_dynar_get_ptr(it->list, *next);
   }