git: 4ae95fe823c0 - main - tests/sys/sys/bitstring_test: fix build with ATF 0.22+

From: Enji Cooper <ngie_at_FreeBSD.org>
Date: Sun, 30 Aug 2026 18:24:59 UTC
The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=4ae95fe823c0ec8b0b93ed27192bfc91058d9a6b

commit 4ae95fe823c0ec8b0b93ed27192bfc91058d9a6b
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-08-19 15:46:50 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-08-30 18:24:51 +0000

    tests/sys/sys/bitstring_test: fix build with ATF 0.22+
    
    Do not assign `b` in the `ATF_REQUIRE` macro. Set and test `b`
    separately to avoid the issue cited by clang++/g++ after
    implementing the change referenced in [1].
    
    MFC after:      2 weeks
    Reported by:    clang (-Wparenthesis)
    Reference:      https://github.com/freebsd/atf/pull/72
---
 tests/sys/sys/bitstring_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/sys/sys/bitstring_test.c b/tests/sys/sys/bitstring_test.c
index bf436040c00f..7766f5744c3a 100644
--- a/tests/sys/sys/bitstring_test.c
+++ b/tests/sys/sys/bitstring_test.c
@@ -885,7 +885,8 @@ ATF_TC_BODY(bitstr_large, tc)
 	ATF_REQUIRE(bitstr_size(nbits) >= nbits / 8);
 
 	/* Allocate the bit string */
-	ATF_REQUIRE(b = bit_alloc(nbits));
+	b = bit_alloc(nbits);
+	ATF_REQUIRE(b != NULL);
 
 	/* Check that we allocated enough */
 	ATF_REQUIRE(malloc_usable_size(b) >= bitstr_size(nbits));