HomeFreeBSD

tests/sys/netinet/tcp_socket: fix build with ATF 0.22+

Description

tests/sys/netinet/tcp_socket: fix build with ATF 0.22+

Confirm that creating clients/sockets was successful by testing the
result separate from the assignment and test that the return value is
not -1 instead of testing that the value returned is non-zero.

This fixes the build with [ATF 0.22+][1].

MFC after: 2 weeks
Reported by: clang (-Wparenthesis)
Reviewed by: tuexen, cc
Differential Revision: https://reviews.freebsd.org/D59284
[1]: https://github.com/freebsd/atf/pull/72

Details

Provenance
ngieAuthored on Sep 2 2026, 7:38 AM
Reviewer
tuexen
Differential Revision
D59284: tests/sys/netinet/tcp_socket: fix build with ATF 0.22+
Parents
rG505103215ee2: tests/sys/kern/ktls_test: fix -Wsign-compare issue
Branches
Unknown
Tags
Unknown