summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2021-04-09 11:45:25 (GMT)
committerJan Niklas Hasse <jhasse@bixense.com>2021-04-09 11:45:25 (GMT)
commit721f5e9342be3bb83ff30edba420d2c508ff0cad (patch)
treef348f3d9b9aa61c24f94429c533ec6fcbfd3ebfb
parent3d33ca89d20da77715d3d10c5cd260b6aee05b53 (diff)
downloadNinja-721f5e9342be3bb83ff30edba420d2c508ff0cad.zip
Ninja-721f5e9342be3bb83ff30edba420d2c508ff0cad.tar.gz
Ninja-721f5e9342be3bb83ff30edba420d2c508ff0cad.tar.bz2
Fix misleading usage of return type of Open*Log
In an earlier version of 791c887e22046e5e7a2d05ecb5ff27701d56895d those functions returned LoadStatus, too, but it was changed back to bool.
-rw-r--r--src/ninja.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index 1cff6e8..56e31e0 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -136,11 +136,11 @@ struct NinjaMain : public BuildLogUser {
int ToolWinCodePage(const Options* options, int argc, char* argv[]);
/// Open the build log.
- /// @return LOAD_ERROR on error.
+ /// @return false on error.
bool OpenBuildLog(bool recompact_only = false);
/// Open the deps log: load it, then open for writing.
- /// @return LOAD_ERROR on error.
+ /// @return false on error.
bool OpenDepsLog(bool recompact_only = false);
/// Ensure the build directory exists, creating it if necessary.
@@ -894,8 +894,8 @@ int NinjaMain::ToolRecompact(const Options* options, int argc, char* argv[]) {
if (!EnsureBuildDirExists())
return 1;
- if (OpenBuildLog(/*recompact_only=*/true) == LOAD_ERROR ||
- OpenDepsLog(/*recompact_only=*/true) == LOAD_ERROR)
+ if (!OpenBuildLog(/*recompact_only=*/true) ||
+ !OpenDepsLog(/*recompact_only=*/true))
return 1;
return 0;