diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-10-22 10:01:20 -0400 | 
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-10-22 10:13:56 -0400 | 
| commit | ee2bbf7ce20616e09f45b8b2f13e6fcba921c57d (patch) | |
| tree | 7895f00a1be28c63c30377264abde11f7a8f8c4d /pimd/mtracebis.c | |
| parent | 84de5a245a3eb17619588a535b9f408ce802a8c9 (diff) | |
pimd: replace inet_ntoa
Replace all use of inet_ntoa, using %pI4 or inet_ntoa instead
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'pimd/mtracebis.c')
| -rw-r--r-- | pimd/mtracebis.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/pimd/mtracebis.c b/pimd/mtracebis.c index 1b812de92c..3b69964960 100644 --- a/pimd/mtracebis.c +++ b/pimd/mtracebis.c @@ -26,7 +26,6 @@  #include "checksum.h"  #include "prefix.h"  #include "mtracebis_routeget.h" -  #include <sys/select.h>  #include <netinet/in.h>  #include <arpa/inet.h> @@ -64,13 +63,14 @@ static void version(void)  static void print_host(struct in_addr addr)  {  	struct hostent *h; +	char buf[PREFIX_STRLEN];  	h = gethostbyaddr(&addr, sizeof(addr), AF_INET);  	if (h == NULL)  		printf("?");  	else  		printf("%s", h->h_name); -	printf(" (%s) ", inet_ntoa(addr)); +	printf(" (%s) ", inet_ntop(AF_INET, &addr, buf, sizeof(buf)));  }  static void print_line_no(int i)  | 
