]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Don't check return value of unsetenv(). It's part of the
authordtucker@openbsd.org <dtucker@openbsd.org>
Tue, 6 Apr 2021 09:07:33 +0000 (09:07 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 6 Apr 2021 09:31:18 +0000 (19:31 +1000)
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

index 3cfe0e7123e02bdf0f53e9ff8381ed2ab5ae37af..c336fb0b2d09fe6a29f6d116a0c75cc0bcbd869a 100644 (file)
@@ -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)); \