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
This commit is contained in:
Robert Watson 2004-09-02 19:53:13 +00:00
parent 9923b511ed
commit 42ec1da481
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134651

View File

@ -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;