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.
This commit is contained in:
John Baldwin 2023-06-20 09:29:00 -07:00
parent 1c3424b0d2
commit 6dd202ce93

View File

@ -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);