Remove IS_INADDR_ANY().

Requested by rgrimes@ in
https://lists.freebsd.org/pipermail/svn-src-head/2019-October/129784.html
This commit is contained in:
jlh 2019-10-19 19:38:53 +00:00
parent 5e4aa6b57b
commit 0baf65d25a

View File

@ -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,