From 57d629220ecdc21449f78ef0585caf7d8e22e059 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 9 May 2017 08:41:18 +0200 Subject: [PATCH] src/liboping.c: Declare a variable at the shortest possible scope. --- src/liboping.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; } -- 2.30.2