From: Joakim Soderberg Date: Mon, 9 Dec 2013 15:58:16 +0000 (+0100) Subject: Fix non-C89 variable declaration. X-Git-Tag: release-2.1.4-alpha~42^2~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d10541474ac371b82dc05250735817cef2a8025;p=libevent Fix non-C89 variable declaration. Microsofts C compiler does not support the C99 standard, so variables has to be declared at the start of a scope. --- diff --git a/evdns.c b/evdns.c index 28ea0f6c..ca274a94 100644 --- a/evdns.c +++ b/evdns.c @@ -4047,8 +4047,8 @@ evdns_base_free(struct evdns_base *base, int fail_requests) void evdns_base_clear_host_addresses(struct evdns_base *base) { - EVDNS_LOCK(base); struct hosts_entry *victim; + EVDNS_LOCK(base); while ((victim = TAILQ_FIRST(&base->hostsdb))) { TAILQ_REMOVE(&base->hostsdb, victim, next); mm_free(victim);