HomeFreeBSD

inpcb: Remove NULL checks of credential references

Description

inpcb: Remove NULL checks of credential references

Some auditing of the code shows that "cred" is never non-NULL in these
functions, either because all callers pass a non-NULL reference or
because they unconditionally dereference "cred". So, let's simplify the
code a bit and remove NULL checks. No functional change intended.

Reviewed by: glebius
MFC after: 1 week
Sponsored by: Modirum MDPay
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37025

Details

Provenance
markjAuthored on Nov 2 2022, 5:03 PM
Reviewer
glebius
Differential Revision
D37025: inpcb: Remove checks for NULL credential references
Parents
rGd0f8e31761b7: getsockopt.2: Clarify the SO_REUSEPORT_LB text a bit
Branches
Unknown
Tags
Unknown