Date: Thu, 18 Jan 2024 21:08:47 GMT From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 17244789c2fd - stable/14 - cr_bsd_visible(): Style fixes Message-ID: <202401182108.40IL8lmB053190@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=17244789c2fd5d3d758a524d98c2b6f887af7905 commit 17244789c2fd5d3d758a524d98c2b6f887af7905 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2024-01-05 15:23:19 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2024-01-18 21:07:53 +0000 cr_bsd_visible(): Style fixes Explicitly test for non-zero return codes. Separate assignment and testing of 'error' in distinct lines. Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43335 (cherry picked from commit a1e37beb45d270ae9926eff3b93e9398d08c94e5) --- sys/kern/kern_prot.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 00eb2fccdeef..7d28475b5db8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1465,11 +1465,14 @@ cr_bsd_visible(struct ucred *u1, struct ucred *u2) { int error; - if ((error = cr_canseeotheruids(u1, u2))) + error = cr_canseeotheruids(u1, u2); + if (error != 0) return (error); - if ((error = cr_canseeothergids(u1, u2))) + error = cr_canseeothergids(u1, u2); + if (error != 0) return (error); - if ((error = cr_canseejailproc(u1, u2))) + error = cr_canseejailproc(u1, u2); + if (error != 0) return (error); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401182108.40IL8lmB053190>