]> git.gsnw.org Git - fping.git/commitdiff
fix DNS lookup error messages
authorDavid Schweikert <david@schweikert.ch>
Fri, 3 Feb 2017 13:39:52 +0000 (14:39 +0100)
committerDavid Schweikert <david@schweikert.ch>
Fri, 3 Feb 2017 13:39:52 +0000 (14:39 +0100)
src/fping.c

index 842e8f4b55b3b0e54af392d8ce714061e700cd95..9de0509f1b5a278843e9f0141323d658589bd16d 100644 (file)
@@ -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;
             }