Module Name:    src
Committed By:   mlelstv
Date:           Sat Feb 29 16:59:00 UTC 2020

Modified Files:
        src/sys/sys: mbuf.h

Log Message:
Follow FreeBSD and cast MLEN and MHLEN to int. mbuf length arithmtic is
done with signed integers and this avoids comparisons with different
signedness.


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/sys/sys/mbuf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.222 src/sys/sys/mbuf.h:1.223
--- src/sys/sys/mbuf.h:1.222	Mon Sep 23 08:04:35 2019
+++ src/sys/sys/mbuf.h	Sat Feb 29 16:59:00 2020
@@ -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 @@ struct _m_ext {
 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 */
 

Reply via email to