From nobody Wed Jan 10 17:50:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T9FhH3MqPz55Txy; Wed, 10 Jan 2024 17:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T9FhH0sH6z46xh; Wed, 10 Jan 2024 17:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UrQmzkCquLAHENX2awvo9IByKhG9SACnmxrZuxC/ZHE=; b=eitCyByR6ZrbqJCRJ3gZDqDe84wQ0LN7VDNfeQc7cb3qAar3q/CW8TxSml2/1GOnzYW6JH kfRJB2qrhQ+IvaiVjxG+cMSHXUmOAcvVwrKjoUTNbALvNv7fgD8FEA0u7mogO0ZgoVZ5dp L6xYjKH+CeQGNU1z77MKI5MFqu1am17Ev5yOSFJ3ZyXIHJ+RMx+KXNVI3KtuLS+dfGraJc ioxFCp+NsmU+L8HaN/4tN00yIIGs8ZlOZWwRXqEP9/bLtjY0XlKkXcmmHNugOwlp3fPWKr C/tBaEaOvQkHkDLPiGhavYsDr2RheScwE3gpP309AVuglToLLvMUvqYvIi1Ucg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704909039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UrQmzkCquLAHENX2awvo9IByKhG9SACnmxrZuxC/ZHE=; b=B4LuNSfe/pQ3dBnoxAOpZDBpVtSXybcnDr6C9MGFdNhOsCV1wppERpAzSI8GQ1gSCgBSVU 1GDyJyExLvevDbxxYpgRssNrwly3tYvSGUpTt8Fz1emeIYEdmPWD1Aj9Es09PTyvc8xvuS k/C74IeVY1jCXPObLnbWdiGFLj7Qrq/myiRNJQCuHZs41k6+LNH2ggCuKDJq11TEGCqVuV yfIOswg+bGcPccLdNpRIWcPPpEvMheXZSJjYftHmaK1l1QtM0cA9tNXKn/sSQpb2AHztHl TDqor91wyi9uRxNeBnFCTeSTZpz423CCIYW3/cCd++z6jXk9E0XGm5rJ5cAJlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704909039; a=rsa-sha256; cv=none; b=npvpzMa1eBskW43+pPvrSPPMVHvzu+seIhghoFhvRhEWEMbzpPgWO4i+RqaxMgC+azz8xJ fRNLiKrnwEoIIMCUQAQAjZbo8+nUvhyP1Dqh19TPQqGXwHmNLuAKgIP9MVaZULfp91Pmdr 4/UUfPejf26/RAaXeyUa0tYjDHkusD8Kdeh7aozVPChC8QCpYCe1z/9OEBgCgm3XWHyKvM WeggQ4c3T8FYF5hR86UXCsqYHtgI8c3tWVedl00nPulso60LwY+mxVhCaO94rH64Svat9g ICEZX0R9fwzZAyTurTpAz2OKaU0NjeUZ1JLeGxL4PPbWG+lfyrrKcPwGJtyjjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T9FhG73QTzl38; Wed, 10 Jan 2024 17:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40AHocbX098344; Wed, 10 Jan 2024 17:50:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40AHocNR098341; Wed, 10 Jan 2024 17:50:38 GMT (envelope-from git) Date: Wed, 10 Jan 2024 17:50:38 GMT Message-Id: <202401101750.40AHocNR098341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a1e37beb45d2 - main - cr_bsd_visible(): Style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1e37beb45d270ae9926eff3b93e9398d08c94e5 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a1e37beb45d270ae9926eff3b93e9398d08c94e5 commit a1e37beb45d270ae9926eff3b93e9398d08c94e5 Author: Olivier Certner AuthorDate: 2024-01-05 15:23:19 +0000 Commit: Olivier Certner CommitDate: 2024-01-10 17:50:19 +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 --- 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 0ebedcd72fc3..be8e0b14add2 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1463,11 +1463,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); }