svn commit: r245222 - head/sys/sys

Gleb Smirnoff glebius at FreeBSD.org
Wed Jan 9 09:12:20 UTC 2013


On Wed, Jan 09, 2013 at 09:09:09AM +0000, Hans Petter Selasky wrote:
H> Author: hselasky
H> Date: Wed Jan  9 09:09:09 2013
H> New Revision: 245222
H> URL: http://svnweb.freebsd.org/changeset/base/245222
H> 
H> Log:
H>   Fix compile warning when using GCC:
H>   Comparison between signed and unsigned.
H>   
H>   MFC after:	1 week
H> 
H> Modified:
H>   head/sys/sys/mbuf.h
H> 
H> Modified: head/sys/sys/mbuf.h
H> ==============================================================================
H> --- head/sys/sys/mbuf.h	Wed Jan  9 08:52:44 2013	(r245221)
H> +++ head/sys/sys/mbuf.h	Wed Jan  9 09:09:09 2013	(r245222)
H> @@ -557,7 +557,7 @@ m_get2(int how, short type, int flags, i
H>  	args.flags = flags;
H>  	args.type = type;
H>  
H> -	if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0))
H> +	if (size <= ((int)MHLEN) || (size <= ((int)MLEN) && (flags & M_PKTHDR) == 0))
H>  		return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how)));
H>  	if (size <= MCLBYTES)
H>  		return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how)));

The function is new and present only in head. I suggest just change its
argument to u_int or size_t, instead of casting.

-- 
Totus tuus, Glebius.


More information about the svn-src-all mailing list