summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_hole.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-01-08 05:34:06 +0000
committerjulian <julian@FreeBSD.org>2001-01-08 05:34:06 +0000
commitff86256bf7f74eac72c4bd8a23d667579c672873 (patch)
treecf83301911bb4085e13cb3bf982901253e5919e5 /sys/netgraph/ng_hole.c
parent6b827cac3b001e32ed3dd87c8875590ebebda375 (diff)
downloadFreeBSD-src-ff86256bf7f74eac72c4bd8a23d667579c672873.zip
FreeBSD-src-ff86256bf7f74eac72c4bd8a23d667579c672873.tar.gz
Part 2 of the netgraph rewrite.
This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org
Diffstat (limited to 'sys/netgraph/ng_hole.c')
-rw-r--r--sys/netgraph/ng_hole.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netgraph/ng_hole.c b/sys/netgraph/ng_hole.c
index 92fa603..8b4df29 100644
--- a/sys/netgraph/ng_hole.c
+++ b/sys/netgraph/ng_hole.c
@@ -45,6 +45,7 @@
*/
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
@@ -98,7 +99,7 @@ ngh_rcvdata(hook_p hook, item_p item)
static int
ngh_disconnect(hook_p hook)
{
- if (hook->node->numhooks == 0)
- ng_rmnode_self(hook->node);
+ if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
+ ng_rmnode_self(NG_HOOK_NODE(hook));
return (0);
}
OpenPOWER on IntegriCloud