Skip to content

Commit 0bdc5de

Browse files
authored
Merge pull request #363 from lplewa/coverity_log
reset test global variable after use to suppress coverity false-positive.
2 parents d1ec2e1 + 2b63952 commit 0bdc5de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/utils/utils_log.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ void helper_log_init(const char *var) {
6363
fopen_count = 0;
6464
fput_count = 0;
6565
util_log_init();
66+
env_variable = NULL;
6667
EXPECT_EQ(fopen_count, expect_fopen_count);
6768
EXPECT_EQ(fput_count, expect_fput_count);
6869
}
@@ -97,7 +98,6 @@ TEST_F(test, parseEnv_errors) {
9798
expected_message = "[ERROR UMF] Cannot open output file - path too long\n";
9899
std::string test_env = "output:file," + std::string(300, 'x');
99100
helper_log_init(test_env.c_str());
100-
env_variable = NULL; // reset env_variable as test_env string is freed.
101101
}
102102

103103
TEST_F(test, parseEnv) {

0 commit comments

Comments
 (0)