From nobody Thu Jan 18 21:10:15 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 4TGFkw1fmMz570ky; Thu, 18 Jan 2024 21:10:16 +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 4TGFkv6VZnz4jCy; Thu, 18 Jan 2024 21:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705612216; 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=qzqZClBzlOfIPisFXbteQI+ZG9SC/AyS4MFj2MHb/mk=; b=d4kxQlCuN7GVR8VdzSaBAM6XKcNW+dLWtz6hfIzZWH2YyDbhyNuUWtZOaTt7Sadlij5cNS CdwxDUFw2v98r41fJnZz+oDptlYqrsL0Hlbd3AWnxMvGIYbxOuEpnORMnZ0ROIGqgLzna2 YRYGuYA/OxjW4CTrRyfVnHilmhXOo3mnTco4NsRqEJwolGl+kGezOi8Ox5BGbfCQGB3O9n oEd2/cYGsArCfT0G3KUdEEAzACTQbDsicN8R/Q9RPjoMWVzxHP26q+r6csXUfqswDlBYBP PboxPJc6XMOxCFlKjLKd5FaP1vnw++Mz+3run9vmPdZJnxbRlbA05hfGnWNqRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705612216; 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=qzqZClBzlOfIPisFXbteQI+ZG9SC/AyS4MFj2MHb/mk=; b=kKdHAJoLzlhlJnjC35SdtKd+dA44XpMxrgsM/2NCYWpeCc4zQGEaiMGxs5dPCFz295dXEb VpumlMCWGc0Md0qomx+1tyZmHQmZYHBjk42z2bnA7db1u23PF38LsZGYPI12IhNyiKL6Vr gqG3zVa64aRmp+g1eYfbXYxuPoK7L68vMGjSVcVZlR8lfPn3w8zPCGm9MaJeHWzwVvf+J2 gnq7+K2hMN+oGvnp5MEK3euz9HPfifb4SY/YuzT33dv7/Yq5t93Db7V2DFwuFm7Y7Vls9q fLYG21GtZtAeC8vy9FdwbEe2JAnmAp503rFSkcrRsOD6Nnzh36RNIbHJvvarAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705612216; a=rsa-sha256; cv=none; b=PGAfFfvt/WCzuXnrdIu4jy5eRFce/rcZQ5Kvuc6CbzXO3akNccGQXzG39fHDFipkjhDHlU 61AoK+QQkIv2ntqOuRh74ia/4ZQa8QLdktcrvLRxvLuK4dbrsr0RlnHK4ZM85aqt6TBwPb 02hlHLhGRV8Oy49EAmlIqlAiGs42CeaQpNzEm0Kf6OjtQGRbQtjpejBv1yfqr2MOcYIjnJ uK3RXGM5kL9V3dv/7GI7Wvf9uhS++rbg/NPxAa3lOhKg+69aAL5kbxbRF7iKqrYqHADeMR z04uA6pxtIF2btz6Zd7+a/QKRProROQuhiT5NJcQw/68vy+CHJX8GZP1sARphg== 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 4TGFkv5ZMKzMxf; Thu, 18 Jan 2024 21:10:15 +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 40ILAFCn060761; Thu, 18 Jan 2024 21:10:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ILAFP5060756; Thu, 18 Jan 2024 21:10:15 GMT (envelope-from git) Date: Thu, 18 Jan 2024 21:10:15 GMT Message-Id: <202401182110.40ILAFP5060756@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: cb3c7be3a916 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: cb3c7be3a91651f6937dbae5cf3483e54ac28f80 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=cb3c7be3a91651f6937dbae5cf3483e54ac28f80 commit cb3c7be3a91651f6937dbae5cf3483e54ac28f80 Author: Olivier Certner AuthorDate: 2024-01-05 15:23:19 +0000 Commit: Olivier Certner CommitDate: 2024-01-18 21:09:50 +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) Approved by: markj (mentor) --- 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 1c9e2927bc5e..a91b7ec3015f 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); }