diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-04-08 14:25:47 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-04-08 14:25:47 +0000 |
commit | fe58453891932b6e42539b9971ec882c24140153 (patch) | |
tree | a9d6dfe9fba9afa35e60736c6acc2bb7970ecd0a /sys/netgraph/bluetooth/socket | |
parent | 50d81222d871ac86e59227ddae88ca5e36b09a5c (diff) | |
download | src-fe58453891932b6e42539b9971ec882c24140153.tar.gz src-fe58453891932b6e42539b9971ec882c24140153.zip |
Introduce an M_ASSERTPKTHDR() macro which performs the very common task
of asserting that an mbuf has a packet header. Use it instead of hand-
rolled versions wherever applicable.
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
Notes
Notes:
svn path=/head/; revision=113255
Diffstat (limited to 'sys/netgraph/bluetooth/socket')
-rw-r--r-- | sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c index 2221f444cd0e..d8da877aa2fe 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c @@ -451,8 +451,7 @@ ng_btsocket_hci_raw_data_input(struct mbuf *nam) KASSERT((nam->m_type == MT_SONAME), ("%s: m_type=%d\n", __func__, nam->m_type)); - KASSERT((m0->m_flags & M_PKTHDR), - ("%s: m_flags=%#x\n", __func__, m0->m_flags)); + M_ASSERTPKTHDR(m0); sa = mtod(nam, struct sockaddr_hci *); @@ -614,8 +613,7 @@ ng_btsocket_hci_raw_output(node_p node, hook_p hook, void *arg1, int arg2) KASSERT((nam->m_type == MT_SONAME), ("%s: m_type=%d\n", __func__, nam->m_type)); - KASSERT((m->m_flags & M_PKTHDR), - ("%s: m_flags=%#x\n", __func__, m->m_flags)); + M_ASSERTPKTHDR(m); sa = mtod(nam, struct sockaddr_hci *); |