git: 26aec3f3b4fc - main - getenv_r tests: Fix getenv_r_erange

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 06 May 2025 13:50:33 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=26aec3f3b4fcdd23411cda6797d18117d9f965d6

commit 26aec3f3b4fcdd23411cda6797d18117d9f965d6
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-05-05 18:30:56 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-05-06 13:49:17 +0000

    getenv_r tests: Fix getenv_r_erange
    
    Fixes:          873420ca1e6e ("libc: Add getenv_r() function.")
    Reviewed by:    des
    Differential Revision:  https://reviews.freebsd.org/D50172
---
 lib/libc/tests/stdlib/getenv_r_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libc/tests/stdlib/getenv_r_test.c b/lib/libc/tests/stdlib/getenv_r_test.c
index 7935ead6c495..8085b92b1064 100644
--- a/lib/libc/tests/stdlib/getenv_r_test.c
+++ b/lib/libc/tests/stdlib/getenv_r_test.c
@@ -55,7 +55,7 @@ ATF_TC_BODY(getenv_r_erange, tc)
 
 	ATF_REQUIRE_EQ(0, setenv("ATF_TC_IDENT", ident, 1));
 	errno = 0;
-	ATF_REQUIRE_EQ(-1, getenv_r(NULL, buf, strlen(ident)));
+	ATF_REQUIRE_EQ(-1, getenv_r("ATF_TC_IDENT", buf, strlen(ident)));
 	ATF_REQUIRE_EQ(ERANGE, errno);
 }