Skip to content

Commit a4105a5

Browse files
committed
sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes
MFC after: 2 days Sponsored by: The FreeBSD Foundation
1 parent 4ae70c3 commit a4105a5

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

sys/rpc/authunix_prot.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
* POSSIBILITY OF SUCH DAMAGE.
3131
*/
3232

33-
#include <sys/cdefs.h>
3433
/*
3534
* authunix_prot.c
3635
* XDR for UNIX style authentication parameters for RPC
@@ -40,8 +39,7 @@
4039

4140
#include <sys/param.h>
4241
#include <sys/jail.h>
43-
#include <sys/kernel.h>
44-
#include <sys/systm.h>
42+
#include <sys/libkern.h>
4543
#include <sys/ucred.h>
4644

4745
#include <rpc/types.h>
@@ -70,12 +68,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred)
7068
namelen = strlen(hostbuf);
7169
if (namelen > AUTH_SYS_MAX_HOSTNAME)
7270
namelen = AUTH_SYS_MAX_HOSTNAME;
73-
} else {
71+
} else
7472
namelen = 0;
75-
}
7673

77-
if (!xdr_uint32_t(xdrs, time)
78-
|| !xdr_uint32_t(xdrs, &namelen))
74+
if (!xdr_uint32_t(xdrs, time) || !xdr_uint32_t(xdrs, &namelen))
7975
return (FALSE);
8076

8177
/*

sys/rpc/svc_auth_unix.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141
*/
4242

4343
#include <sys/param.h>
44-
#include <sys/lock.h>
45-
#include <sys/mutex.h>
4644
#include <sys/systm.h>
4745
#include <sys/ucred.h>
4846

@@ -131,7 +129,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg)
131129
buf++;
132130
}
133131
xcr->cr_ngroups = MIN(supp_ngroups + 1, XU_NGROUPS);
134-
} else if (! xdr_authunix_parms(&xdrs, &time, xcr))
132+
} else if (!xdr_authunix_parms(&xdrs, &time, xcr))
135133
goto badcred;
136134

137135
rqst->rq_verf = _null_auth;

0 commit comments

Comments
 (0)