HomeFreeBSD

tcp: cleanup of syncache_expand()

Description

tcp: cleanup of syncache_expand()

  • Consistently free the string after unlocking the sch, if possible.
  • Remove the failure handling in case of sc != NULL, since this is not possible anymore.
  • Remove the use of goto and instead return 0 in the three cases.

The only change in behavior is that in three out of the four cases,
where 0 is returned, *lsop is not set to NULL anymore. So the behavior
is now consistent and also documented in a comment. The current in
tree callers only look at *lsop, if and only if syncache_expand()
returns 1.

Reviewed by: Peter Lei
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D52948

Details

Provenance
tuexenAuthored on Oct 17 2025, 5:40 AM
Reviewer
peter
Differential Revision
D52948: tcp: cleanup of syncache_expand()
Parents
rGc1e7e8f5cb0f: Add FENESTRASX to LINT to avoid breakage
Branches
Unknown
Tags
Unknown