]> granicus.if.org Git - libevent/commitdiff
Fix non-C89 variable declaration.
authorJoakim Soderberg <joakim.soderberg@gmail.com>
Mon, 9 Dec 2013 15:58:16 +0000 (16:58 +0100)
committerJoakim Soderberg <joakim.soderberg@gmail.com>
Mon, 9 Dec 2013 15:58:16 +0000 (16:58 +0100)
Microsofts C compiler does not support the C99 standard, so variables has
to be declared at the start of a scope.

evdns.c

diff --git a/evdns.c b/evdns.c
index 28ea0f6c64195893089837c2a4dae0acf5c51fa2..ca274a94f102d720921f1a9dedcb7e8b74e97203 100644 (file)
--- 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);