Source-Changes-HG archive

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

[src/trunk]: src/sys/kern assert mbuf chains m_cat'ed are of the same type.



details:   https://anonhg.NetBSD.org/src/rev/d938350d88ae
branches:  trunk
changeset: 551505:d938350d88ae
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sun Sep 07 12:04:13 2003 +0000

description:
assert mbuf chains m_cat'ed are of the same type.

diffstat:

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

diffs (27 lines):

diff -r 41dd090ae725 -r d938350d88ae sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Sun Sep 07 11:59:40 2003 +0000
+++ b/sys/kern/uipc_mbuf.c      Sun Sep 07 12:04:13 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.72 2003/09/04 04:10:32 itojun Exp $    */
+/*     $NetBSD: uipc_mbuf.c,v 1.73 2003/09/07 12:04:13 yamt Exp $      */
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.72 2003/09/04 04:10:32 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.73 2003/09/07 12:04:13 yamt Exp $");
 
 #include "opt_mbuftrace.h"
 
@@ -635,6 +635,8 @@
 m_cat(struct mbuf *m, struct mbuf *n)
 {
 
+       KASSERT(n == NULL || m->m_type == n->m_type);
+
        while (m->m_next)
                m = m->m_next;
        while (n) {



Home | Main Index | Thread Index | Old Index