git: 043d6753ca7c - main - Correct some nits in the prior commit (de6328af0c8c)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Nov 2026 01:00:07 UTC
The branch main has been updated by ngie:
URL: https://cgit.FreeBSD.org/src/commit/?id=043d6753ca7c1c1e3ffa09a9f953f0df50d3a22e
commit 043d6753ca7c1c1e3ffa09a9f953f0df50d3a22e
Author: Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-11-13 00:56:40 +0000
Commit: Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-13 00:59:56 +0000
Correct some nits in the prior commit (de6328af0c8c)
- Remove unnecessary casts.
- Use the right printf qualifier (%z is for *`size_t`; %j is for
*`maxint_t`). I was mixing up `off_t` in my head.
MFC after: 1 week
Noted by: des (IRC)
Fixes: de6328af0c8c ("tests/sys/kern/ssl_sendfile: :eagain_vs_eof: ...")
---
tests/sys/kern/ssl_sendfile.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tests/sys/kern/ssl_sendfile.c b/tests/sys/kern/ssl_sendfile.c
index d44296c90750..0f3b0d309e96 100644
--- a/tests/sys/kern/ssl_sendfile.c
+++ b/tests/sys/kern/ssl_sendfile.c
@@ -474,8 +474,7 @@ ATF_TC_BODY(eagain_vs_eof, tc)
*/
ATF_REQUIRE(pthread_mutex_lock(&c.mtx) == 0);
sendme_locked_wait(&c, 0, FSIZE, true);
- ATF_REQUIRE_MSG(c.sbytes > 0, "c.sbytes <= 0: %jd",
- (ossl_ssize_t)c.sbytes);
+ ATF_REQUIRE_MSG(c.sbytes > 0, "c.sbytes <= 0: %zd", c.sbytes);
ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == 0);
#if 0 /* see https://github.com/openssl/openssl/issues/29742 */
ATF_REQUIRE(BIO_should_retry(SSL_get_wbio(c.srv)));
@@ -485,8 +484,7 @@ ATF_TC_BODY(eagain_vs_eof, tc)
* Exercise second attempt on already full buffer.
*/
sendme_locked_wait(&c, 0, FSIZE, true);
- ATF_REQUIRE_MSG(c.sbytes == -1, "c.sbytes != -1: %jd",
- (ossl_ssize_t)c.sbytes);
+ ATF_REQUIRE_MSG(c.sbytes == -1, "c.sbytes != -1: %zd", c.sbytes);
ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == SSL_ERROR_WANT_WRITE);
ATF_REQUIRE(BIO_should_retry(SSL_get_wbio(c.srv)));
@@ -507,8 +505,7 @@ ATF_TC_BODY(eagain_vs_eof, tc)
* rather than asserts that this is a correct behavior.
*/
sendme_locked_wait(&c, FSIZE, 0, true);
- ATF_REQUIRE_MSG(c.sbytes == 0, "c.sbytes != 0: %jd",
- (ossl_ssize_t)c.sbytes);
+ ATF_REQUIRE_MSG(c.sbytes == 0, "c.sbytes != 0: %zd", c.sbytes);
ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == SSL_ERROR_SYSCALL);
#if 0 /* see https://github.com/openssl/openssl/issues/29742 */
ATF_REQUIRE(!BIO_should_retry(SSL_get_wbio(c.srv)));
@@ -518,8 +515,7 @@ ATF_TC_BODY(eagain_vs_eof, tc)
* Exercise short write due to end of file.
*/
sendme_locked_wait(&c, FSIZE - 100, 0, true);
- ATF_REQUIRE_MSG(c.sbytes == 100, "c.sbytes != 100: %jd",
- (ossl_ssize_t)c.sbytes);
+ ATF_REQUIRE_MSG(c.sbytes == 100, "c.sbytes != 100: %zd", c.sbytes);
ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == 0);
#if 0 /* see https://github.com/openssl/openssl/issues/29742 */
ATF_REQUIRE(!BIO_should_retry(SSL_get_wbio(c.srv)));
@@ -540,4 +536,4 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, eagain_vs_eof);
return atf_no_error();
-}
+}
\ No newline at end of file