From: Joakim Soderberg Date: Mon, 9 Dec 2013 15:54:57 +0000 (+0100) Subject: Fix non-C89 variable declaration. X-Git-Tag: release-2.1.4-alpha~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6b2a26755ecd8b532a58b34c7aacd404454c5fb;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);