diff options
author | bmilekic <bmilekic@FreeBSD.org> | 2000-10-15 17:57:00 +0000 |
---|---|---|
committer | bmilekic <bmilekic@FreeBSD.org> | 2000-10-15 17:57:00 +0000 |
commit | 76e5fb2ac326d7c6ad69e329420821c2ff95a645 (patch) | |
tree | c3e177bde12f90a78b0c87ed80d5242bf3d4a794 /sys/sys | |
parent | cd3bbf9dd583c5bd224d95646c3cddaaf6e52582 (diff) | |
download | FreeBSD-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.h | 6 |
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 \ |