summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2000-10-15 17:57:00 +0000
committerbmilekic <bmilekic@FreeBSD.org>2000-10-15 17:57:00 +0000
commit76e5fb2ac326d7c6ad69e329420821c2ff95a645 (patch)
treec3e177bde12f90a78b0c87ed80d5242bf3d4a794 /sys/sys
parentcd3bbf9dd583c5bd224d95646c3cddaaf6e52582 (diff)
downloadFreeBSD-src-76e5fb2ac326d7c6ad69e329420821c2ff95a645.zip
FreeBSD-src-76e5fb2ac326d7c6ad69e329420821c2ff95a645.tar.gz
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
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/mbuf.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 9d751c8..b8b4e07 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 \
OpenPOWER on IntegriCloud