Author: bz
Date: Wed Dec 25 20:08:44 2013
New Revision: 259884
URL: http://svnweb.freebsd.org/changeset/base/259884

Log:
  Correct warnings comparing unsigned variables < 0 constantly reported
  while building kernels.  All instances removed are indeed unsigned so
  the expressions could not be true.
  
  MFC after:    1 week

Modified:
  head/sys/netinet6/in6_mcast.c

Modified: head/sys/netinet6/in6_mcast.c
==============================================================================
--- head/sys/netinet6/in6_mcast.c       Wed Dec 25 19:38:16 2013        
(r259883)
+++ head/sys/netinet6/in6_mcast.c       Wed Dec 25 20:08:44 2013        
(r259884)
@@ -1851,8 +1851,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);
                }
@@ -2198,7 +2197,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)
@@ -2356,7 +2355,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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to