mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 01:55:19 +01:00
sendfile tests: Fix an error check in tcp_socketpair()
Fixes: c368d3f20f
("tests/sendfile: factor out tcp_socketpair()")
Differential Revision: https://reviews.freebsd.org/D45598
This commit is contained in:
parent
681fd2bed8
commit
ac52fa1f1b
@ -84,7 +84,7 @@ tcp_socketpair(int *sv)
|
|||||||
if (fcntl(sv[0], F_SETFL, flags) == -1)
|
if (fcntl(sv[0], F_SETFL, flags) == -1)
|
||||||
err(1, "fcntl +O_NONBLOCK");
|
err(1, "fcntl +O_NONBLOCK");
|
||||||
|
|
||||||
if (connect(sv[0], (void *)&sin, sizeof(sin)) != -1 ||
|
if (connect(sv[0], (void *)&sin, sizeof(sin)) == -1 &&
|
||||||
errno != EINPROGRESS)
|
errno != EINPROGRESS)
|
||||||
err(1, "connect cs");
|
err(1, "connect cs");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user