Skip to content

Commit 24f7011

Browse files
author
MarcoFalke
committed
Merge #13349: bench: Don't return a bool from main
493a166 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
2 parents 36fc805 + 493a166 commit 24f7011

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/bench/bench_bitcoin.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,19 @@ static void SetupBenchArgs()
3939
gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN);
4040
}
4141

42-
int
43-
main(int argc, char** argv)
42+
int main(int argc, char** argv)
4443
{
4544
SetupBenchArgs();
4645
std::string error;
4746
if (!gArgs.ParseParameters(argc, argv, error)) {
4847
fprintf(stderr, "Error parsing command line arguments: %s\n", error.c_str());
49-
return false;
48+
return EXIT_FAILURE;
5049
}
5150

5251
if (HelpRequested(gArgs)) {
5352
std::cout << gArgs.GetHelpMessage();
5453

55-
return 0;
54+
return EXIT_SUCCESS;
5655
}
5756

5857
SHA256AutoDetect();
@@ -80,4 +79,6 @@ main(int argc, char** argv)
8079
benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, regex_filter, is_list_only);
8180

8281
ECC_Stop();
82+
83+
return EXIT_SUCCESS;
8384
}

0 commit comments

Comments
 (0)