authnone_marshal(AUTH *client, XDR *xdrs)
{
struct authnone_private *ap;
- bool_t dummy;
+ bool_t rv = FALSE;
extern mutex_t authnone_lock;
assert(xdrs != NULL);
+ mutex_lock(&authnone_lock);
ap = authnone_private;
- if (ap == NULL) {
- mutex_unlock(&authnone_lock);
- return (FALSE);
+ if (ap) {
+ rv = (*xdrs->x_ops->x_putbytes)(xdrs, ap->marshalled_client,
+ ap->mcnt);
}
- dummy = (*xdrs->x_ops->x_putbytes)(xdrs,
- ap->marshalled_client, ap->mcnt);
mutex_unlock(&authnone_lock);
- return (dummy);
+ return (rv);
}
/* All these unused parameters are required to keep ANSI-C from grumbling */