@@ -496,7 +496,7 @@ void BitcoinApplication::shutdownResult(int retval)
496496void BitcoinApplication::handleRunawayException (const QString &message)
497497{
498498 QMessageBox::critical (0 , " Runaway exception" , BitcoinGUI::tr (" A fatal error occurred. Bitcoin can no longer continue safely and will quit." ) + QString (" \n\n " ) + message);
499- ::exit (1 );
499+ ::exit (EXIT_FAILURE );
500500}
501501
502502WId BitcoinApplication::getMainWinId () const
@@ -573,28 +573,28 @@ int main(int argc, char *argv[])
573573 {
574574 HelpMessageDialog help (NULL , mapArgs.count (" -version" ));
575575 help.showOrPrint ();
576- return 0 ;
576+ return EXIT_SUCCESS ;
577577 }
578578
579579 // / 5. Now that settings and translations are available, ask user for data directory
580580 // User language is set up: pick a data directory
581581 if (!Intro::pickDataDirectory ())
582- return 0 ;
582+ return EXIT_SUCCESS ;
583583
584584 // / 6. Determine availability of data directory and parse bitcoin.conf
585585 // / - Do not call GetDataDir(true) before this step finishes
586586 if (!boost::filesystem::is_directory (GetDataDir (false )))
587587 {
588588 QMessageBox::critical (0 , QObject::tr (PACKAGE_NAME),
589589 QObject::tr (" Error: Specified data directory \" %1\" does not exist." ).arg (QString::fromStdString (mapArgs[" -datadir" ])));
590- return 1 ;
590+ return EXIT_FAILURE ;
591591 }
592592 try {
593593 ReadConfigFile (mapArgs, mapMultiArgs);
594594 } catch (const std::exception& e) {
595595 QMessageBox::critical (0 , QObject::tr (PACKAGE_NAME),
596596 QObject::tr (" Error: Cannot parse configuration file: %1. Only use key=value syntax." ).arg (e.what ()));
597- return 1 ;
597+ return EXIT_FAILURE ;
598598 }
599599
600600 // / 7. Determine network (and switch to network specific options)
@@ -608,7 +608,7 @@ int main(int argc, char *argv[])
608608 SelectParams (ChainNameFromCommandLine ());
609609 } catch (std::exception &e) {
610610 QMessageBox::critical (0 , QObject::tr (PACKAGE_NAME), QObject::tr (" Error: %1" ).arg (e.what ()));
611- return 1 ;
611+ return EXIT_FAILURE ;
612612 }
613613#ifdef ENABLE_WALLET
614614 // Parse URIs on command line -- this can affect Params()
@@ -630,7 +630,7 @@ int main(int argc, char *argv[])
630630 // - Do this after creating app and setting up translations, so errors are
631631 // translated properly.
632632 if (PaymentServer::ipcSendCommandLine ())
633- exit (0 );
633+ exit (EXIT_SUCCESS );
634634
635635 // Start up the payment server early, too, so impatient users that click on
636636 // bitcoin: links repeatedly have their payment requests routed to this process:
0 commit comments