From 9e01af2ac2e4bd6520ea41e453e770e092050c23 Mon Sep 17 00:00:00 2001 From: Aaron Lipinski Date: Thu, 8 Apr 2021 08:14:00 +1200 Subject: [PATCH] rename function --- ui/gtk.c | 2 +- ui/mtr.c | 5 ++--- ui/mtr.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 8ad0bbd..7c4a9fd 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -248,7 +248,7 @@ static gint Host_activate( ctl->af = DEFAULT_AF; // should this obey the cmd line option? ctl->Hostname = gtk_entry_get_text(GTK_ENTRY(entry)); - if (get_hostent_from_name(ctl, &res, ctl->Hostname) == 0) { + if (get_addrinfo_from_name(ctl, &res, ctl->Hostname) == 0) { net_reopen(ctl, res); freeaddrinfo(res); net_send_batch(ctl); diff --git a/ui/mtr.c b/ui/mtr.c index a044d1e..6fd0d70 100644 --- a/ui/mtr.c +++ b/ui/mtr.c @@ -694,12 +694,11 @@ static void init_rand( would be to use gethostbyname(). We'll use getaddrinfo() instead to generate the hostent. */ -int get_hostent_from_name( +int get_addrinfo_from_name( struct mtr_ctl *ctl, struct addrinfo **res, const char *name) { - printf("get_hostent_from_name: %x %s\n", ctl->af, name); int gai_error; struct addrinfo hints; @@ -796,7 +795,7 @@ int main( } struct addrinfo *res = NULL; - if (get_hostent_from_name(&ctl, &res, ctl.Hostname) != 0) { + if (get_addrinfo_from_name(&ctl, &res, ctl.Hostname) != 0) { if (ctl.Interactive) exit(EXIT_FAILURE); else { diff --git a/ui/mtr.h b/ui/mtr.h index 46c7a18..9297be7 100644 --- a/ui/mtr.h +++ b/ui/mtr.h @@ -149,7 +149,7 @@ struct mplslen { #define running_as_root() (getuid() == 0) #endif -int get_hostent_from_name( +int get_addrinfo_from_name( struct mtr_ctl *ctl, struct addrinfo **res, const char *name); -- 2.47.2