Cleanup: Refactor the test of TEST_TMPDIR env variable. No need to keep a separate variable at the top of the file, it is simpler to just check the return value of getenv() directly in the call site. -- Change-Id: I896836206ccbf20743ef9679b10cec0cb7406122 MOS_MIGRATED_REVID=90505777
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 9e9e506..39dff42 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc
@@ -76,9 +76,6 @@ namespace blaze { -// Blaze is being run by a test. -static const bool TESTING = getenv("TEST_TMPDIR") != NULL; - extern char **environ; //////////////////////////////////////////////////////////////////////// @@ -1403,7 +1400,7 @@ unsetenv("_JAVA_OPTIONS"); } - if (TESTING) { + if (getenv("TEST_TMPDIR") != NULL) { fprintf(stderr, "INFO: $TEST_TMPDIR defined: output root default is " "'%s'.\n", globals->options.output_root.c_str()); }