svn commit: r270044 - stable/10/sys/netinet6
Bjoern A. Zeeb
bz at FreeBSD.org
Sat Aug 16 13:09:40 UTC 2014
Author: bz
Date: Sat Aug 16 13:09:40 2014
New Revision: 270044
URL: http://svnweb.freebsd.org/changeset/base/270044
Log:
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.
Modified:
stable/10/sys/netinet6/in6_mcast.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/netinet6/in6_mcast.c
==============================================================================
--- stable/10/sys/netinet6/in6_mcast.c Sat Aug 16 13:06:11 2014 (r270043)
+++ stable/10/sys/netinet6/in6_mcast.c Sat Aug 16 13:09:40 2014 (r270044)
@@ -1849,8 +1849,7 @@ in6p_join_group(struct inpcb *inp, struc
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, stru
* 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,
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);
More information about the svn-src-stable-10
mailing list