]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
remove wrapper only function
authorAaron Lipinski <aaron.lipinski@roboticsplus.co.nz>
Tue, 6 Apr 2021 00:25:12 +0000 (12:25 +1200)
committerAaron Lipinski <aaron.lipinski@roboticsplus.co.nz>
Thu, 8 Apr 2021 20:36:25 +0000 (08:36 +1200)
ui/dns.c
ui/dns.h
ui/gtk.c

index 902aa677c8789934fa254b20691892af65a579f1..8f47316c4d7ab14eed2571d7370c3d3344f7d531 100644 (file)
--- a/ui/dns.c
+++ b/ui/dns.c
@@ -87,18 +87,6 @@ static int longipstr(
 }
 
 
-struct hostent *dns_forward(
-    const char *name)
-{
-    struct hostent *host;
-
-    if ((host = gethostbyname(name)))
-        return host;
-    else
-        return NULL;
-}
-
-
 static struct dns_results *findip(
     struct mtr_ctl *ctl,
     ip_t * ip)
index 921110e4a14810615abdb1b93f0b301de0777921..918bc51ca9262508c1015d63070ba795edb67ab3 100644 (file)
--- a/ui/dns.h
+++ b/ui/dns.h
@@ -41,8 +41,6 @@ extern char *dns_lookup(
 extern char *dns_lookup2(
     struct mtr_ctl *ctl,
     ip_t * address);
-extern struct hostent *dns_forward(
-    const char *name);
 extern char *strlongip(
     sa_family_t family,
     ip_t * ip);
index e23abf26c539a1e8a2db102cdda5a6446e228db9..a98154afe660118e84c699e1d4796f6efb6025a5 100644 (file)
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -246,7 +246,7 @@ static gint Host_activate(
     struct mtr_ctl *ctl = (struct mtr_ctl *) data;
     struct hostent *addr;
 
-    addr = dns_forward(gtk_entry_get_text(GTK_ENTRY(entry)));
+    addr = gethostbyname(gtk_entry_get_text(GTK_ENTRY(entry)));
     if (addr) {
         net_reopen(ctl, addr);
         net_send_batch(ctl);