Skip to content

Commit a87d02a

Browse files
author
Marko Bencun
committed
use EXIT_ codes instead of magic numbers
To be consistent with other exit() calls.
1 parent 7639d38 commit a87d02a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/bitcoind.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,17 @@ bool AppInit(int argc, char* argv[])
136136
if (!AppInitBasicSetup())
137137
{
138138
// InitError will have been called with detailed error, which ends up on console
139-
exit(1);
139+
exit(EXIT_FAILURE);
140140
}
141141
if (!AppInitParameterInteraction())
142142
{
143143
// InitError will have been called with detailed error, which ends up on console
144-
exit(1);
144+
exit(EXIT_FAILURE);
145145
}
146146
if (!AppInitSanityChecks())
147147
{
148148
// InitError will have been called with detailed error, which ends up on console
149-
exit(1);
149+
exit(EXIT_FAILURE);
150150
}
151151
if (GetBoolArg("-daemon", false))
152152
{

src/test/test_bitcoin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransaction &txn, CTxMemPo
156156

157157
void Shutdown(void* parg)
158158
{
159-
exit(0);
159+
exit(EXIT_SUCCESS);
160160
}
161161

162162
void StartShutdown()
163163
{
164-
exit(0);
164+
exit(EXIT_SUCCESS);
165165
}
166166

167167
bool ShutdownRequested()

0 commit comments

Comments
 (0)