git: 6dd202ce930c - main - unix_seqpacket_test: Consistently use datalen as length to send.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jun 2023 16:29:30 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6dd202ce930c6e77db4f4f2c5fe835a28d8c6a04 commit 6dd202ce930c6e77db4f4f2c5fe835a28d8c6a04 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-06-20 16:29:00 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-06-20 16:29:00 +0000 unix_seqpacket_test: Consistently use datalen as length to send. This matches the other tests in this file and quiets a set but unused warning from GCC. --- tests/sys/kern/unix_seqpacket_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index 6d50816b02ff..72be92ee398b 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -829,7 +829,7 @@ ATF_TC_BODY(shutdown_send_sigpipe, tc) ATF_CHECK_EQ(0, shutdown(s2, SHUT_RDWR)); ATF_REQUIRE(SIG_ERR != signal(SIGPIPE, shutdown_send_sigpipe_handler)); datalen = strlen(data) + 1; /* +1 for the null */ - (void)send(s2, data, sizeof(*data), MSG_EOR); + (void)send(s2, data, datalen, MSG_EOR); ATF_CHECK_EQ(1, got_sigpipe); close(s); close(s2);