aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordonaloconnor <donaloconnor@gmail.com>2017-10-16 21:20:28 +0100
committerdonaloconnor <donaloconnor@gmail.com>2017-10-16 22:16:36 +0100
commitb296bf1496b213eaea53cac0a734679fed7a42f5 (patch)
tree7bd3fa0ffbcbf15e8bb3754f73d918f76971e051
parent2c66cea2d18682de1eef544fc3b74a1487a1741c (diff)
Init: Remove redundant exit(EXIT_FAILURE) instances and replace with return false
-rw-r--r--src/bitcoind.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 543eba0e69..5f88c35dbd 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -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;
}
}
@@ -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))
{
@@ -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);
}