[openssh-commits] [openssh] 03/03: upstream: Don't check return value of unsetenv(). It's part of the

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Apr 6 19:31:37 AEST 2021


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 679bdc4a5c9244f427a7aee9c14b0a0ed086da1f
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Tue Apr 6 09:07:33 2021 +0000

    upstream: Don't check return value of unsetenv(). It's part of the
    
    environment setup and not part of the actual test, and some platforms
    -portable runs on declare it as returning void, which prevents the test from
    compiling.
    
    OpenBSD-Regress-ID: 24f08543ee3cdebc404f2951f3e388cc82b844a1
---
 regress/unittests/misc/test_expand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/regress/unittests/misc/test_expand.c b/regress/unittests/misc/test_expand.c
index 3cfe0e71..c336fb0b 100644
--- a/regress/unittests/misc/test_expand.c
+++ b/regress/unittests/misc/test_expand.c
@@ -1,4 +1,4 @@
-/* 	$OpenBSD: test_expand.c,v 1.1 2021/03/19 03:25:01 djm Exp $ */
+/* 	$OpenBSD: test_expand.c,v 1.2 2021/04/06 09:07:33 dtucker Exp $ */
 /*
  * Regress test for misc string expansion functions.
  *
@@ -30,7 +30,7 @@ test_expand(void)
 	TEST_START("dollar_expand");
 	ASSERT_INT_EQ(setenv("FOO", "bar", 1), 0);
 	ASSERT_INT_EQ(setenv("BAR", "baz", 1), 0);
-	ASSERT_INT_EQ(unsetenv("BAZ"), 0);
+	(void)unsetenv("BAZ");
 #define ASSERT_DOLLAR_EQ(x, y) do { \
 	char *str = dollar_expand(NULL, (x)); \
 	ASSERT_STRING_EQ(str, (y)); \

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list