From 7ba0dcf1ae233d3649810367ed83c673b9df0b9e Mon Sep 17 00:00:00 2001 From: Bosko Milekic Date: Sun, 15 Oct 2000 17:57:00 +0000 Subject: [PATCH] Correct check for NULL in MEXT_INIT_REF() which should be checking whether mbuf->m_ext.ref_cnt is NULL, and not whether mbuf is. Also, remove spaces before "mbtypes" in MGET and MGETHDR macros. Pointed out by: dwmalone --- sys/sys/mbuf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 9d751c89495..b8b4e07100a 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -320,7 +320,7 @@ struct mcntfree_lst { struct mbuf *__mmm = (m); \ \ _MEXT_ALLOC_CNT(__mmm->m_ext.ref_cnt, (how)); \ - if (__mmm != NULL) \ + if (__mmm->m_ext.ref_cnt != NULL) \ MEXT_ADD_REF(__mmm); \ } while (0) @@ -367,7 +367,7 @@ struct mcntfree_lst { mtx_enter(&mmbfree.m_mtx, MTX_DEF); \ _MGET(_mm, _mhow); \ if (_mm != NULL) { \ - mbtypes[_mtype]++; \ + mbtypes[_mtype]++; \ mtx_exit(&mmbfree.m_mtx, MTX_DEF); \ _MGET_SETUP(_mm, _mtype); \ } else \ @@ -394,7 +394,7 @@ struct mcntfree_lst { mtx_enter(&mmbfree.m_mtx, MTX_DEF); \ _MGET(_mm, _mhow); \ if (_mm != NULL) { \ - mbtypes[_mtype]++; \ + mbtypes[_mtype]++; \ mtx_exit(&mmbfree.m_mtx, MTX_DEF); \ _MGETHDR_SETUP(_mm, _mtype); \ } else \