Skip to content

Commit

Permalink
Use INADDR_ANY over 0 in evutil_found_ifaddr()
Browse files Browse the repository at this point in the history
  • Loading branch information
azat committed Oct 24, 2018
1 parent ab406fc commit d5f8525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ evutil_found_ifaddr(const struct sockaddr *sa)
if (sa->sa_family == AF_INET) {
const struct sockaddr_in *sin = (struct sockaddr_in *)sa;
ev_uint32_t addr = ntohl(sin->sin_addr.s_addr);
if (addr == 0 ||
if (addr == INADDR_ANY ||
evutil_v4addr_is_localhost(addr) ||
evutil_v4addr_is_linklocal(addr) ||
evutil_v4addr_is_classd(addr)) {
Expand Down

0 comments on commit d5f8525

Please sign in to comment.