summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2013-01-09 09:29:22 +0000
committerhselasky <hselasky@FreeBSD.org>2013-01-09 09:29:22 +0000
commitb63b7017bb1a90be6087cf288cd64b04b1d65fe4 (patch)
tree15ae43eafe24609919f8b899eaadf7387c7e2dbc
parentb253ec79a44a000117755467213e77a9d2c28e70 (diff)
downloadFreeBSD-src-b63b7017bb1a90be6087cf288cd64b04b1d65fe4.zip
FreeBSD-src-b63b7017bb1a90be6087cf288cd64b04b1d65fe4.tar.gz
Change function argument type instead of casting.
Suggested by: glebius @
-rw-r--r--sys/sys/mbuf.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index df08881..22742c9 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -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, int size)
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)));
OpenPOWER on IntegriCloud