From ae97a89e1a1a9833080dccc81f6cd26784e1b964 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 11 Jan 2001 11:42:17 +0000 Subject: A large update from Manuel Novoa III . --- libc/inet/resolv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/inet/resolv.c') diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 7abc9b506..18f366e87 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -455,6 +455,8 @@ int dns_lookup(const char *name, int type, int nscount, const char **nsip, extern int searchdomains; extern const char * searchdomain[MAX_SEARCH]; + fd = -1; + if (!packet || !lookup || !nscount) goto fail; @@ -462,8 +464,6 @@ int dns_lookup(const char *name, int type, int nscount, const char **nsip, ns %= nscount; - fd = -1; - while (retries++ < MAX_RETRIES) { if (fd != -1) -- cgit v1.2.3