summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2014-08-16 13:09:40 +0000
committerbz <bz@FreeBSD.org>2014-08-16 13:09:40 +0000
commit2ec5bb69f444194289e212c7ba08981f9917b11f (patch)
treed48793e6a624e5325948aac032b97d6d61c3dcd7 /sys/netinet6
parent1843acbd6db9a7df79d78cd983a46a193595613e (diff)
downloadFreeBSD-src-2ec5bb69f444194289e212c7ba08981f9917b11f.zip
FreeBSD-src-2ec5bb69f444194289e212c7ba08981f9917b11f.tar.gz
MFC r259884:
Correct warnings comparing unsigned variables < 0 constantly reported while building kernels. All instances removed are indeed unsigned so the expressions could not be true.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_mcast.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index d6ec0b3..f40c0a8 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -1849,8 +1849,7 @@ in6p_join_group(struct inpcb *inp, struct sockopt *sopt)
if (mreq.ipv6mr_interface == 0) {
ifp = in6p_lookup_mcast_ifp(inp, &gsa->sin6);
} else {
- if (mreq.ipv6mr_interface < 0 ||
- V_if_index < mreq.ipv6mr_interface)
+ if (V_if_index < mreq.ipv6mr_interface)
return (EADDRNOTAVAIL);
ifp = ifnet_byindex(mreq.ipv6mr_interface);
}
@@ -2194,7 +2193,7 @@ in6p_leave_group(struct inpcb *inp, struct sockopt *sopt)
* XXX SCOPE6 lock potentially taken here.
*/
if (ifindex != 0) {
- if (ifindex < 0 || V_if_index < ifindex)
+ if (V_if_index < ifindex)
return (EADDRNOTAVAIL);
ifp = ifnet_byindex(ifindex);
if (ifp == NULL)
@@ -2349,7 +2348,7 @@ in6p_set_multicast_if(struct inpcb *inp, struct sockopt *sopt)
error = sooptcopyin(sopt, &ifindex, sizeof(u_int), sizeof(u_int));
if (error)
return (error);
- if (ifindex < 0 || V_if_index < ifindex)
+ if (V_if_index < ifindex)
return (EINVAL);
ifp = ifnet_byindex(ifindex);
OpenPOWER on IntegriCloud