diff --git a/sys/netinet/in.c b/sys/netinet/in.c index db087b28d4c..edff895df98 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -129,10 +129,10 @@ static struct sx in_control_sx; SX_SYSINIT(in_control_sx, &in_control_sx, "in_control"); /* - * Return 1 if an internet address is for a ``local'' host + * Return true if an internet address is for a ``local'' host * (one to which we have a connection). */ -int +bool in_localaddr(struct in_addr in) { u_long i = ntohl(in.s_addr); @@ -142,10 +142,10 @@ in_localaddr(struct in_addr in) CK_STAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { if ((i & ia->ia_subnetmask) == ia->ia_subnet) - return (1); + return (true); } - return (0); + return (false); } /* diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 80c872367f9..db36962aadb 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -677,7 +677,7 @@ struct in_ifaddr; int in_broadcast(struct in_addr, struct ifnet *); int in_ifaddr_broadcast(struct in_addr, struct in_ifaddr *); int in_canforward(struct in_addr); -int in_localaddr(struct in_addr); +bool in_localaddr(struct in_addr); bool in_localip(struct in_addr); bool in_localip_fib(struct in_addr, uint16_t); int in_ifhasaddr(struct ifnet *, struct in_addr);