HomeFreeBSD

cr_canseeothergids(): Make the logic easier to grasp

Description

cr_canseeothergids(): Make the logic easier to grasp

Invert the initial test on whether the policy is in force so that, if
there are no restrictions, the function bails out early, allowing to
de-indent the rest of the code and have it finish with a non-zero (deny)
'return'.

No functional change (intended).

MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52272

(cherry picked from commit f75d0dc533923345c653dcdcd5ebd1e53377a7c5)

Details

Provenance
olceAuthored on Aug 27 2025, 4:53 PM
Differential Revision
D52272: cr_canseeothergids(): Make the logic easier to grasp
Parents
rG563771ecdd0c: libc: compat.h: Remove a superfluous blank line at end
Branches
Unknown
Tags
Unknown