From: Florian Forster Date: Tue, 9 May 2017 06:41:18 +0000 (+0200) Subject: src/liboping.c: Declare a variable at the shortest possible scope. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=57d629220ecdc21449f78ef0585caf7d8e22e059;p=liboping.git src/liboping.c: Declare a variable at the shortest possible scope. --- diff --git a/src/liboping.c b/src/liboping.c index 5a39633..8b3ca4d 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -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; }