From a87d02adad2d566927136694dc0d7b202d72691d Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Tue, 21 Feb 2017 17:16:25 +0900 Subject: [PATCH] use EXIT_ codes instead of magic numbers To be consistent with other exit() calls. --- src/bitcoind.cpp | 6 +++--- src/test/test_bitcoin.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 9bab3a202..a3d02afcd 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -136,17 +136,17 @@ bool AppInit(int argc, char* argv[]) if (!AppInitBasicSetup()) { // InitError will have been called with detailed error, which ends up on console - exit(1); + exit(EXIT_FAILURE); } if (!AppInitParameterInteraction()) { // InitError will have been called with detailed error, which ends up on console - exit(1); + exit(EXIT_FAILURE); } if (!AppInitSanityChecks()) { // InitError will have been called with detailed error, which ends up on console - exit(1); + exit(EXIT_FAILURE); } if (GetBoolArg("-daemon", false)) { diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 4785415e3..51fc6ae0b 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -156,12 +156,12 @@ CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransaction &txn, CTxMemPo void Shutdown(void* parg) { - exit(0); + exit(EXIT_SUCCESS); } void StartShutdown() { - exit(0); + exit(EXIT_SUCCESS); } bool ShutdownRequested()