Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Add a KASSERT to make sure that "sizeof(struct mbuf...



details:   https://anonhg.NetBSD.org/src/rev/8dba808d6cc4
branches:  trunk
changeset: 545935:8dba808d6cc4
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri Apr 18 01:24:20 2003 +0000

description:
Add a KASSERT to make sure that "sizeof(struct mbuf)" is MSIZE.
Extra insurance for Steve Woodford's recent <sys/mbuf.h> patch.

diffstat:

 sys/kern/uipc_mbuf.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r b88925225f64 -r 8dba808d6cc4 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Fri Apr 18 00:35:14 2003 +0000
+++ b/sys/kern/uipc_mbuf.c      Fri Apr 18 01:24:20 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.66 2003/04/12 02:49:25 thorpej Exp $   */
+/*     $NetBSD: uipc_mbuf.c,v 1.67 2003/04/18 01:24:20 simonb Exp $    */
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.66 2003/04/12 02:49:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.67 2003/04/18 01:24:20 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -145,6 +145,7 @@
 {
 
        KASSERT(sizeof(struct _m_ext) <= MHLEN);
+       KASSERT(sizeof(struct mbuf) == MSIZE);
 
        pool_init(&mbpool, msize, 0, 0, 0, "mbpl", NULL);
        pool_init(&mclpool, mclbytes, 0, 0, 0, "mclpl", &mclpool_allocator);



Home | Main Index | Thread Index | Old Index