Bump version to 1.10.0; Update ChangeLog.
[liboping.git] / src / liboping.c
index 5a39633..eca5c16 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * Object oriented C module to send ICMP and ICMPv6 `echo's.
- * Copyright (C) 2006-2016  Florian octo Forster <ff at octo.it>
+ * Copyright (C) 2006-2017  Florian octo Forster <ff at octo.it>
  *
  * This library is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published by the
@@ -1141,17 +1141,15 @@ pingobj_t *ping_construct (void)
 void ping_destroy (pingobj_t *obj)
 {
        pinghost_t *current;
-       pinghost_t *next;
 
        if (obj == NULL)
                return;
 
        current = obj->head;
-       next = NULL;
 
        while (current != NULL)
        {
-               next = current->next;
+               pinghost_t *next = current->next;
                ping_free (current);
                current = next;
        }