From f7fba1b8e4468116c6f99bdff3aae16f43518da9 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Sun, 15 Oct 2006 21:43:42 +0000 Subject: [PATCH] Use DNS_ERROR instead of -1 where appropriate --- src/network/dns.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/dns.c b/src/network/dns.c index 62fb0636..0d0622b7 100644 --- a/src/network/dns.c +++ b/src/network/dns.c @@ -159,7 +159,7 @@ do_real_lookup(unsigned char *name, struct sockaddr_storage **addrs, int *addrno memset(&hint, 0, sizeof(hint)); hint.ai_family = AF_UNSPEC; hint.ai_socktype = SOCK_STREAM; - if (getaddrinfo(name, NULL, &hint, &ai) != 0) return -1; + if (getaddrinfo(name, NULL, &hint, &ai) != 0) return DNS_ERROR; #else /* Seems there are problems on Mac, so we first need to try @@ -386,7 +386,7 @@ do_queued_lookup(struct dnsquery *query) assertm(!dns_queue->next_in_queue, "DNS queue corrupted"); dns_queue->next_in_queue = query; dns_queue = query; - return -1; + return DNS_ERROR; } dns_queue = query; @@ -512,7 +512,7 @@ kill_dns_request(void **queryref) assert(query); query->done = NULL; - done_dns_lookup(query, -1); + done_dns_lookup(query, DNS_ERROR); } void -- 2.11.4.GIT