Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2025 12:22:54 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a4105a5d4e17 - main - sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes
Message-ID:  <202510141222.59ECMsfS019757@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=a4105a5d4e179aa1ef661ee45d6008e83fefd2a7

commit a4105a5d4e179aa1ef661ee45d6008e83fefd2a7
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-10-07 17:10:12 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-10-14 12:21:50 +0000

    sys/rpc: UNIX auth: Style: Remove unnecessary headers, minor changes
    
    MFC after:      2 days
    Sponsored by:   The FreeBSD Foundation
---
 sys/rpc/authunix_prot.c | 10 +++-------
 sys/rpc/svc_auth_unix.c |  4 +---
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c
index 0274a713ff2b..ff4c12c3f52e 100644
--- a/sys/rpc/authunix_prot.c
+++ b/sys/rpc/authunix_prot.c
@@ -30,7 +30,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 /*
  * authunix_prot.c
  * XDR for UNIX style authentication parameters for RPC
@@ -40,8 +39,7 @@
 
 #include <sys/param.h>
 #include <sys/jail.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
+#include <sys/libkern.h>
 #include <sys/ucred.h>
 
 #include <rpc/types.h>
@@ -70,12 +68,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred)
 		namelen = strlen(hostbuf);
 		if (namelen > AUTH_SYS_MAX_HOSTNAME)
 			namelen = AUTH_SYS_MAX_HOSTNAME;
-	} else {
+	} else
 		namelen = 0;
-	}
 
-	if (!xdr_uint32_t(xdrs, time)
-	    || !xdr_uint32_t(xdrs, &namelen))
+	if (!xdr_uint32_t(xdrs, time) || !xdr_uint32_t(xdrs, &namelen))
 		return (FALSE);
 
 	/*
diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c
index 4d5535a4fee2..9e4b0b8483b5 100644
--- a/sys/rpc/svc_auth_unix.c
+++ b/sys/rpc/svc_auth_unix.c
@@ -41,8 +41,6 @@
  */
 
 #include <sys/param.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
 #include <sys/systm.h>
 #include <sys/ucred.h>
 
@@ -131,7 +129,7 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg)
 				buf++;
 		}
 		xcr->cr_ngroups = MIN(supp_ngroups + 1, XU_NGROUPS);
-	} else if (! xdr_authunix_parms(&xdrs, &time, xcr))
+	} else if (!xdr_authunix_parms(&xdrs, &time, xcr))
 		goto badcred;
 
 	rqst->rq_verf = _null_auth;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510141222.59ECMsfS019757>