... looks really strange.
Logically nothing is done by the checking, removing it makes things simpler and clearer.
Signed-off-by: Huang Le 4tarhl@gmail.com
... looks really strange.
Logically nothing is done by the checking, removing it makes things simpler and clearer.
Signed-off-by: Huang Le 4tarhl@gmail.com
183 | - 184 | - if (fRet && fDaemon) 185 | - return 0; 186 | - 187 | - return (fRet ? 0 : 1); 188 | + return (AppInit(argc, argv) ? 0 : 1);
How about:
return !AppInit(argc, argv);
!AppInit() is fine also, but keeping the conditional expression reminders reader about the value type: AppInit() returns a bool while main() returns an int. Just my 2 cents.
@4tar yeah - I think it makes some sense to enumerate the values here, as the RPC client can return other exit codes than 0 and 1 (which it does directly in AppInit() through exit(), which is damn ugly, but RPC client functionality is going to be removed from bitcoind anyway).
Huh, that check is indeed strange. ACK on removing it.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/0b78ba8ad69d55817f2b62c631a71b5ac32549f1 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.