From: Yu Watanabe Date: Thu, 1 Aug 2024 02:57:43 +0000 (+0900) Subject: test: resolve "Unchecked return value" coverity warning X-Git-Tag: v257-rc1~776^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6141fe925a88f88330b52f55f85fc7b20b4d227c;p=thirdparty%2Fsystemd.git test: resolve "Unchecked return value" coverity warning Follow-up for c8210d98a4b64af6fadb1cb765c0451758af1303. Fixes CID#1548920. --- diff --git a/src/test/test-terminal-util.c b/src/test/test-terminal-util.c index 68b9cbe6062..f1e04ae6320 100644 --- a/src/test/test-terminal-util.c +++ b/src/test/test-terminal-util.c @@ -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(); }