use the new single-argument ares_strerror()

pull/1/head
Daniel Stenberg 22 years ago
parent 3d0a7c00df
commit 950eb09ae5
  1. 4
      adig.c
  2. 4
      ahost.c

@ -239,7 +239,7 @@ int main(int argc, char **argv)
if (status != ARES_SUCCESS) if (status != ARES_SUCCESS)
{ {
fprintf(stderr, "ares_init_options: %s\n", fprintf(stderr, "ares_init_options: %s\n",
ares_strerror(status, &errmem)); ares_strerror(status));
ares_free_errmem(errmem); ares_free_errmem(errmem);
return 1; return 1;
} }
@ -295,7 +295,7 @@ static void callback(void *arg, int status, unsigned char *abuf, int alen)
*/ */
if (status != ARES_SUCCESS) if (status != ARES_SUCCESS)
{ {
printf("%s\n", ares_strerror(status, &errmem)); printf("%s\n", ares_strerror(status));
ares_free_errmem(errmem); ares_free_errmem(errmem);
if (!abuf) if (!abuf)
return; return;

@ -59,7 +59,7 @@ int main(int argc, char **argv)
status = ares_init(&channel); status = ares_init(&channel);
if (status != ARES_SUCCESS) if (status != ARES_SUCCESS)
{ {
fprintf(stderr, "ares_init: %s\n", ares_strerror(status, &errmem)); fprintf(stderr, "ares_init: %s\n", ares_strerror(status));
ares_free_errmem(errmem); ares_free_errmem(errmem);
return 1; return 1;
} }
@ -101,7 +101,7 @@ static void callback(void *arg, int status, struct hostent *host)
if (status != ARES_SUCCESS) if (status != ARES_SUCCESS)
{ {
fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status, &mem)); fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status));
ares_free_errmem(mem); ares_free_errmem(mem);
return; return;
} }

Loading…
Cancel
Save