aboutsummaryrefslogtreecommitdiff
path: root/src/bench/bench_bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-05-30 19:52:58 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-05-31 07:22:33 +0200
commit493a166948329c6122c00793f6423187e17ef726 (patch)
tree165e9a6ea3cb9f04a46df548386aeb3cd5186a80 /src/bench/bench_bitcoin.cpp
parent61fcef0f89c4eb313b94a93880d7638b90aa0764 (diff)
bench: Don't return a bool from main
Return `EXIT_SUCCESS` 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. Also add a final return for clarity.
Diffstat (limited to 'src/bench/bench_bitcoin.cpp')
-rw-r--r--src/bench/bench_bitcoin.cpp9
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;
}