Every main()/exit() should return/use one of EXIT_ codes instead of magic numbers

This commit is contained in:
UdjinM6
2016-11-07 21:31:38 +03:00
committed by lateminer
parent 10ea8235a8
commit 4dc8b6acfd
2 changed files with 10 additions and 10 deletions

View File

@@ -128,8 +128,8 @@ bool AppInit(int argc, char* argv[])
if (fCommandLine)
{
fprintf(stderr, "Error: There is no RPC client functionality in blackmored anymore. Use the blackmore-cli utility instead.\n");
exit(1);
fprintf(stderr, "Error: There is no RPC client functionality in blackmored anymore. Use the blackmored-cli utility instead.\n");
exit(EXIT_FAILURE);
}
#ifndef WIN32
fDaemon = GetBoolArg("-daemon", false);
@@ -189,5 +189,5 @@ int main(int argc, char* argv[])
// Connect bitcoind signal handlers
noui_connect();
return (AppInit(argc, argv) ? 0 : 1);
return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);
}