Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jan 2013 09:29:22 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r245223 - head/sys/sys
Message-ID:  <201301090929.r099TMew019446@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Jan  9 09:29:22 2013
New Revision: 245223
URL: http://svnweb.freebsd.org/changeset/base/245223

Log:
  Change function argument type instead of casting.
  
  Suggested by:	glebius @

Modified:
  head/sys/sys/mbuf.h

Modified: head/sys/sys/mbuf.h
==============================================================================
--- head/sys/sys/mbuf.h	Wed Jan  9 09:09:09 2013	(r245222)
+++ head/sys/sys/mbuf.h	Wed Jan  9 09:29:22 2013	(r245223)
@@ -396,7 +396,7 @@ extern uma_zone_t	zone_ext_refcnt;
 static __inline struct mbuf	*m_getcl(int how, short type, int flags);
 static __inline struct mbuf	*m_get(int how, short type);
 static __inline struct mbuf	*m_get2(int how, short type, int flags,
-				    int size);
+				    u_int size);
 static __inline struct mbuf	*m_gethdr(int how, short type);
 static __inline struct mbuf	*m_getjcl(int how, short type, int flags,
 				    int size);
@@ -548,7 +548,7 @@ m_getcl(int how, short type, int flags)
  * XXX: This is rather large, should be real function maybe.
  */
 static __inline struct mbuf *
-m_get2(int how, short type, int flags, int size)
+m_get2(int how, short type, int flags, u_int size)
 {
 	struct mb_args args;
 	struct mbuf *m, *n;
@@ -557,7 +557,7 @@ m_get2(int how, short type, int flags, i
 	args.flags = flags;
 	args.type = type;
 
-	if (size <= ((int)MHLEN) || (size <= ((int)MLEN) && (flags & M_PKTHDR) == 0))
+	if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0))
 		return ((struct mbuf *)(uma_zalloc_arg(zone_mbuf, &args, how)));
 	if (size <= MCLBYTES)
 		return ((struct mbuf *)(uma_zalloc_arg(zone_pack, &args, how)));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301090929.r099TMew019446>