summaryrefslogtreecommitdiff
path: root/evdns.c
diff options
context:
space:
mode:
authorJoakim Soderberg <joakim.soderberg@gmail.com>2013-12-09 16:54:57 +0100
committerJoakim Soderberg <joakim.soderberg@gmail.com>2013-12-09 16:54:57 +0100
commite6b2a26755ecd8b532a58b34c7aacd404454c5fb (patch)
tree070c4a2d29a51bccc41078180940cb1a1c8af077 /evdns.c
parent45eba6ffd5cf28e20d906a6bb0e2c8a2e242ba56 (diff)
downloadlibevent-e6b2a26755ecd8b532a58b34c7aacd404454c5fb.tar.gz
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.
Diffstat (limited to 'evdns.c')
-rw-r--r--evdns.c2
1 files changed, 1 insertions, 1 deletions
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);