]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: resolve "Unchecked return value" coverity warning
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 1 Aug 2024 02:57:43 +0000 (11:57 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 1 Aug 2024 13:42:08 +0000 (22:42 +0900)
Follow-up for c8210d98a4b64af6fadb1cb765c0451758af1303.
Fixes CID#1548920.

src/test/test-terminal-util.c

index 68b9cbe606232ab2cc55ffd5e6ef0d6bdfb7df19..f1e04ae632098dad27e2204b979f2307979680c4 100644 (file)
@@ -279,7 +279,7 @@ TEST(get_color_mode) {
         test_get_color_mode_with_env("COLORTERM", "24bit",     terminal_is_dumb() ? COLOR_OFF : COLOR_24BIT);
         test_get_color_mode_with_env("COLORTERM", "invalid",   terminal_is_dumb() ? COLOR_OFF : COLOR_256);
         test_get_color_mode_with_env("COLORTERM", "42",        terminal_is_dumb() ? COLOR_OFF : COLOR_256);
-        unsetenv("COLORTERM");
+        ASSERT_OK_ERRNO(unsetenv("COLORTERM"));
         reset_terminal_feature_caches();
 }