Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Follow FreeBSD and cast MLEN and MHLEN to int. mbuf ...
details: https://anonhg.NetBSD.org/src/rev/58d371c98422
branches: trunk
changeset: 745351:58d371c98422
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sat Feb 29 16:59:00 2020 +0000
description:
Follow FreeBSD and cast MLEN and MHLEN to int. mbuf length arithmtic is
done with signed integers and this avoids comparisons with different
signedness.
diffstat:
sys/sys/mbuf.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r d20209a98eaa -r 58d371c98422 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h Sat Feb 29 16:56:58 2020 +0000
+++ b/sys/sys/mbuf.h Sat Feb 29 16:59:00 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mbuf.h,v 1.222 2019/09/23 08:04:35 maxv Exp $ */
+/* $NetBSD: mbuf.h,v 1.223 2020/02/29 16:59:00 mlelstv Exp $ */
/*
* Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -319,9 +319,9 @@
MBUF_DEFINE(_mbuf_dummy, 1, 1);
/* normal data len */
-#define MLEN (MSIZE - offsetof(struct _mbuf_dummy, m_dat))
+#define MLEN ((int)(MSIZE - offsetof(struct _mbuf_dummy, m_dat)))
/* data len w/pkthdr */
-#define MHLEN (MSIZE - offsetof(struct _mbuf_dummy, m_pktdat))
+#define MHLEN ((int)(MSIZE - offsetof(struct _mbuf_dummy, m_pktdat)))
#define MINCLSIZE (MHLEN+MLEN+1) /* smallest amount to put in cluster */
Home |
Main Index |
Thread Index |
Old Index