Browse Source

use EXIT_ codes instead of magic numbers

To be consistent with other exit() calls.
0.15
Marko Bencun 7 years ago
parent
commit
a87d02adad
  1. 6
      src/bitcoind.cpp
  2. 4
      src/test/test_bitcoin.cpp

6
src/bitcoind.cpp

@ -136,17 +136,17 @@ bool AppInit(int argc, char* argv[]) @@ -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))
{

4
src/test/test_bitcoin.cpp

@ -156,12 +156,12 @@ CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransaction &txn, CTxMemPo @@ -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()

Loading…
Cancel
Save