Page MenuHomeFreeBSD

tcp: cleanup of syncache_expand()
Needs ReviewPublic

Authored by tuexen on Mon, Oct 6, 10:07 PM.
Tags
None
Referenced Files
F131604761: D52948.diff
Thu, Oct 9, 4:27 PM
Unknown Object (File)
Thu, Oct 9, 3:19 PM
Unknown Object (File)
Thu, Oct 9, 3:18 PM
Unknown Object (File)
Thu, Oct 9, 2:09 PM
Unknown Object (File)
Tue, Oct 7, 4:01 PM
Unknown Object (File)
Tue, Oct 7, 8:17 AM
Unknown Object (File)
Tue, Oct 7, 3:17 AM
Unknown Object (File)
Tue, Oct 7, 2:55 AM

Details

Summary
  • 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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped