From 15ba41c72587536ebb28313f0320c413aa329375 Mon Sep 17 00:00:00 2001 From: David Schweikert Date: Fri, 3 Feb 2017 14:39:52 +0100 Subject: [PATCH] fix DNS lookup error messages --- src/fping.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/fping.c b/src/fping.c index 842e8f4..9de0509 100644 --- a/src/fping.c +++ b/src/fping.c @@ -2026,9 +2026,7 @@ void add_name(char* name) sizeof(namebuf) / sizeof(char), NULL, 0, 0); if (ret) { if (!quiet_flag) { - ret = getnameinfo(res->ai_addr, res->ai_addrlen, namebuf, - sizeof(namebuf) / sizeof(char), NULL, 0, 0); - print_warning("%s: can't reverse-lookup (%s)\n", name, gai_strerror(ret_ga)); + print_warning("%s: can't reverse-lookup (%s)\n", name, gai_strerror(ret)); } printname = name; } else { @@ -2043,7 +2041,7 @@ void add_name(char* name) sizeof(addrbuf) / sizeof(char), NULL, 0, NI_NUMERICHOST); if (ret) { if (!quiet_flag) { - print_warning("%s: can't forward-lookup address (%s)\n", name, gai_strerror(ret_ga)); + print_warning("%s: can't forward-lookup address (%s)\n", name, gai_strerror(ret)); } continue; } -- 2.43.0