summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-09-02 19:53:13 +0000
committerrwatson <rwatson@FreeBSD.org>2004-09-02 19:53:13 +0000
commit2a581a76ba0da7114c14ca6d9ef44920bbaa0d1d (patch)
tree6cbc6260d75d01c00cf939501dd2c283ceb15887 /sys/netgraph
parentd9af98161a593a71f96724acd29231e7fff3cfe2 (diff)
downloadFreeBSD-src-2a581a76ba0da7114c14ca6d9ef44920bbaa0d1d.zip
FreeBSD-src-2a581a76ba0da7114c14ca6d9ef44920bbaa0d1d.tar.gz
In FreeBSD 5.x, curthread is always defined, so we don't need to to test
and optionally use &thread0 if it's NULL. Spotted by: julian
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_ksocket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c
index 715baa9..735b5ff 100644
--- a/sys/netgraph/ng_ksocket.c
+++ b/sys/netgraph/ng_ksocket.c
@@ -547,7 +547,7 @@ ng_ksocket_constructor(node_p node)
static int
ng_ksocket_newhook(node_p node, hook_p hook, const char *name0)
{
- struct thread *td = curthread ? curthread : &thread0; /* XXX broken */
+ struct thread *td = curthread; /* XXX broken */
const priv_p priv = NG_NODE_PRIVATE(node);
char *s1, *s2, name[NG_HOOKSIZ];
int family, type, protocol, error;
@@ -662,7 +662,7 @@ ng_ksocket_connect(hook_p hook)
static int
ng_ksocket_rcvmsg(node_p node, item_p item, hook_p lasthook)
{
- struct thread *td = curthread ? curthread : &thread0; /* XXX broken */
+ struct thread *td = curthread; /* XXX broken */
const priv_p priv = NG_NODE_PRIVATE(node);
struct socket *const so = priv->so;
struct ng_mesg *resp = NULL;
@@ -888,7 +888,7 @@ done:
static int
ng_ksocket_rcvdata(hook_p hook, item_p item)
{
- struct thread *td = curthread ? curthread : &thread0; /* XXX broken */
+ struct thread *td = curthread; /* XXX broken */
const node_p node = NG_HOOK_NODE(hook);
const priv_p priv = NG_NODE_PRIVATE(node);
struct socket *const so = priv->so;
OpenPOWER on IntegriCloud