Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net/npf Cast m_mbuflen() result to "size_t". It could al...



details:   https://anonhg.NetBSD.org/src/rev/62f6f1f2df60
branches:  trunk
changeset: 454739:62f6f1f2df60
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Sep 26 18:44:45 2019 +0000

description:
Cast m_mbuflen() result to "size_t". It could also be "u_int" since it is
assigned to "u_int", but all the other "standalone" equivalent functions return
"size_t".

diffstat:

 sys/net/npf/npf_mbuf.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r dde13a4d3878 -r 62f6f1f2df60 sys/net/npf/npf_mbuf.c
--- a/sys/net/npf/npf_mbuf.c    Thu Sep 26 18:36:08 2019 +0000
+++ b/sys/net/npf/npf_mbuf.c    Thu Sep 26 18:44:45 2019 +0000
@@ -36,7 +36,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.22 2018/11/15 10:23:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.23 2019/09/26 18:44:45 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/mbuf.h>
@@ -62,7 +62,7 @@
 #define        m_flags_p(m,f)          true
 #else
 #define        m_next_ptr(m)           (m)->m_next
-#define        m_buflen(m)             (m)->m_len
+#define        m_buflen(m)             ((size_t)(m)->m_len)
 #define        m_flags_p(m,f)          (((m)->m_flags & (f)) != 0)
 #endif
 



Home | Main Index | Thread Index | Old Index