From 3a36d4fdea65d4881b6ef72d819d0e6e1f20855f Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Fri, 13 Feb 2004 12:28:27 +0000
Subject: [PATCH] removed usage of unset variables (by a function that does
 nothing!)

---
 ares/adig.c  | 5 +----
 ares/ahost.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/ares/adig.c b/ares/adig.c
index 85cea0a11..0513d2fd7 100644
--- a/ares/adig.c
+++ b/ares/adig.c
@@ -140,7 +140,6 @@ int main(int argc, char **argv)
   struct hostent *hostent;
   fd_set read_fds, write_fds;
   struct timeval *tvp, tv;
-  char *errmem;
 
 #ifdef WIN32
   WORD wVersionRequested = MAKEWORD(1,1);
@@ -240,7 +239,6 @@ int main(int argc, char **argv)
     {
       fprintf(stderr, "ares_init_options: %s\n",
 	      ares_strerror(status));
-      ares_free_errmem(errmem);
       return 1;
     }
 
@@ -281,7 +279,7 @@ int main(int argc, char **argv)
 
 static void callback(void *arg, int status, unsigned char *abuf, int alen)
 {
-  char *name = (char *) arg, *errmem;
+  char *name = (char *) arg;
   int id, qr, opcode, aa, tc, rd, ra, rcode;
   unsigned int qdcount, ancount, nscount, arcount, i;
   const unsigned char *aptr;
@@ -296,7 +294,6 @@ static void callback(void *arg, int status, unsigned char *abuf, int alen)
   if (status != ARES_SUCCESS)
     {
       printf("%s\n", ares_strerror(status));
-      ares_free_errmem(errmem);
       if (!abuf)
 	return;
     }
diff --git a/ares/ahost.c b/ares/ahost.c
index 6aa6e3f59..f643c755b 100644
--- a/ares/ahost.c
+++ b/ares/ahost.c
@@ -44,7 +44,6 @@ int main(int argc, char **argv)
   int status, nfds;
   fd_set read_fds, write_fds;
   struct timeval *tvp, tv;
-  char *errmem;
   struct in_addr addr;
 
 #ifdef WIN32
@@ -60,7 +59,6 @@ int main(int argc, char **argv)
   if (status != ARES_SUCCESS)
     {
       fprintf(stderr, "ares_init: %s\n", ares_strerror(status));
-      ares_free_errmem(errmem);
       return 1;
     }
 
@@ -97,12 +95,11 @@ int main(int argc, char **argv)
 static void callback(void *arg, int status, struct hostent *host)
 {
   struct in_addr addr;
-  char *mem, **p;
+  char **p;
 
   if (status != ARES_SUCCESS)
     {
       fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status));
-      ares_free_errmem(mem);
       return;
     }
 
-- 
2.40.0