From 823fb01837f4a398d7d4796410af1ef1959104a5 Mon Sep 17 00:00:00 2001 From: rwatson Date: Thu, 2 Sep 2004 19:53:13 +0000 Subject: [PATCH] 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 --- sys/netgraph/ng_ksocket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index 715baa961811..735b5ffd2446 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 @@ ng_ksocket_rcvmsg(node_p node, item_p item, hook_p lasthook) 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;