Skip to content

Commit

Permalink
Fix misleading usage of return type of Open*Log
Browse files Browse the repository at this point in the history
In an earlier version of 791c887 those
functions returned LoadStatus, too, but it was changed back to bool.
  • Loading branch information
jhasse committed Apr 9, 2021
1 parent 3d33ca8 commit 721f5e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ninja.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 721f5e9

Please sign in to comment.