diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-05-31 05:14:07 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-05-31 05:14:18 -0400 |
commit | 24f70118414fb06dc7fbcebf43438b5e7ef248e9 (patch) | |
tree | b3a250219c4fbaa16e38ccb1a0d87d6d49aa72b0 | |
parent | 36fc8052f62b87b11b0366fefee5f38dc886aefd (diff) | |
parent | 493a166948329c6122c00793f6423187e17ef726 (diff) |
Merge #13349: bench: Don't return a bool from main
493a166948 bench: Don't return a bool from main (Wladimir J. van der Laan)
Pull request description:
Return `1` from `main()` on error, not the bool `false` (introduced in #13112). This is the correct value to return on error, and also shuts up a clang warning.
Tree-SHA512: 52a0f1b2f6ae2697555f71ee2019ce657046f7f379f1f4faf3cce9d5f3fb21fcdc43a4c84895a2a8b6929997ba70bbe87c231f2f9553215b84c22333810d58d9
-rw-r--r-- | src/bench/bench_bitcoin.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bench/bench_bitcoin.cpp b/src/bench/bench_bitcoin.cpp index a820d67fa8..556d1fae9e 100644 --- a/src/bench/bench_bitcoin.cpp +++ b/src/bench/bench_bitcoin.cpp @@ -39,20 +39,19 @@ static void SetupBenchArgs() gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN); } -int -main(int argc, char** argv) +int main(int argc, char** argv) { SetupBenchArgs(); std::string error; if (!gArgs.ParseParameters(argc, argv, error)) { fprintf(stderr, "Error parsing command line arguments: %s\n", error.c_str()); - return false; + return EXIT_FAILURE; } if (HelpRequested(gArgs)) { std::cout << gArgs.GetHelpMessage(); - return 0; + return EXIT_SUCCESS; } SHA256AutoDetect(); @@ -80,4 +79,6 @@ main(int argc, char** argv) benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, regex_filter, is_list_only); ECC_Stop(); + + return EXIT_SUCCESS; } |