From 0baf65d25a8a510a095426a29679233774d0f79a Mon Sep 17 00:00:00 2001 From: jlh Date: Sat, 19 Oct 2019 19:38:53 +0000 Subject: [PATCH] Remove IS_INADDR_ANY(). Requested by rgrimes@ in https://lists.freebsd.org/pipermail/svn-src-head/2019-October/129784.html --- usr.bin/procstat/procstat_files.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.bin/procstat/procstat_files.c b/usr.bin/procstat/procstat_files.c index 53628d2990af..fabbcb6426ac 100644 --- a/usr.bin/procstat/procstat_files.c +++ b/usr.bin/procstat/procstat_files.c @@ -94,7 +94,6 @@ addr_to_string(struct sockaddr_storage *ss, char *buffer, int buflen) struct sockaddr_in6 *sin6; struct sockaddr_in *sin; struct sockaddr_un *sun; -#define IS_INADDR_ANY(x) ((x).s_addr == INADDR_ANY) switch (ss->ss_family) { case AF_LOCAL: @@ -107,7 +106,7 @@ addr_to_string(struct sockaddr_storage *ss, char *buffer, int buflen) case AF_INET: sin = (struct sockaddr_in *)ss; - if (IS_INADDR_ANY(sin->sin_addr)) + if (sin->sin_addr.s_addr == INADDR_ANY) snprintf(buffer, buflen, "%s:%d", "*", ntohs(sin->sin_port)); else if (inet_ntop(AF_INET, &sin->sin_addr, buffer2,