Skip to content

Commit

Permalink
Init: Remove redundant exit(EXIT_FAILURE) instances and replace with …
Browse files Browse the repository at this point in the history
…return false
  • Loading branch information
donaloconnor committed Oct 16, 2017
1 parent 2c66cea commit b296bf1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/bitcoind.cpp
Expand Up @@ -120,7 +120,7 @@ bool AppInit(int argc, char* argv[])
for (int i = 1; i < argc; i++) {
if (!IsSwitchChar(argv[i][0])) {
fprintf(stderr, "Error: Command line contains unexpected token '%s', see bitcoind -h for a list of options.\n", argv[i]);
exit(EXIT_FAILURE);
return false;
}
}

Expand All @@ -132,17 +132,17 @@ bool AppInit(int argc, char* argv[])
if (!AppInitBasicSetup())
{
// InitError will have been called with detailed error, which ends up on console
exit(EXIT_FAILURE);
return false;
}
if (!AppInitParameterInteraction())
{
// InitError will have been called with detailed error, which ends up on console
exit(EXIT_FAILURE);
return false;
}
if (!AppInitSanityChecks())
{
// InitError will have been called with detailed error, which ends up on console
exit(EXIT_FAILURE);
return false;
}
if (gArgs.GetBoolArg("-daemon", false))
{
Expand All @@ -163,7 +163,7 @@ bool AppInit(int argc, char* argv[])
if (!AppInitLockDataDirectory())
{
// If locking the data directory failed, exit immediately
exit(EXIT_FAILURE);
return false;
}
fRet = AppInitMain(threadGroup, scheduler);
}
Expand Down

0 comments on commit b296bf1

Please sign in to comment.