[Init] Remove redundant exit(EXIT_FAILURE) instances and replace with return false #11511

pull donaloconnor wants to merge 1 commits into bitcoin:master from donaloconnor:161017_refactor_AppInit changing 1 files +5 −5
  1. donaloconnor commented at 8:32 PM on October 16, 2017: contributor

    While reviewing the bitcoin code I noticed that there are a few exit(EXIT_FAILURE) at various places in the AppInit function.

    This function returns to main() which will return/exit with EXIT_FAILURE so returning false instead of an explicit exit(EXIT_FAILURE) seems to be cleaner.

    This PR attempts to make things a bit more consistent.

    There is a subtle difference between exit() and return from main in that the exit() will not clean up any local vars but I don't think this makes a difference in this case. Using exit() might even lead to bugs in the future where the dtor of local objects are expected to be called.

  2. promag commented at 8:56 PM on October 16, 2017: member

    Please squash.

    utACK.

  3. Init: Remove redundant exit(EXIT_FAILURE) instances and replace with return false b296bf1496
  4. donaloconnor force-pushed on Oct 16, 2017
  5. fanquake added the label Refactoring on Oct 16, 2017
  6. practicalswift commented at 5:43 AM on October 17, 2017: contributor

    Concept ACK

  7. laanwj commented at 1:55 PM on October 18, 2017: member

    Concept ACK, this is more consistent, I don't think this was done on purpose, but grew like this because AppInit used to return a exit status directly.

  8. MarcoFalke commented at 9:39 PM on October 18, 2017: member

    utACK b296bf1496b213eaea53cac0a734679fed7a42f5

  9. fanquake commented at 1:25 PM on November 1, 2017: member

    utACK b296bf1

  10. laanwj merged this on Nov 1, 2017
  11. laanwj closed this on Nov 1, 2017

  12. laanwj referenced this in commit db2f83ed46 on Nov 1, 2017
  13. PastaPastaPasta referenced this in commit c783c4d57d on Dec 22, 2019
  14. PastaPastaPasta referenced this in commit 9b5e30ad6a on Jan 2, 2020
  15. PastaPastaPasta referenced this in commit e16d4acab7 on Jan 4, 2020
  16. PastaPastaPasta referenced this in commit b51f450006 on Jan 12, 2020
  17. PastaPastaPasta referenced this in commit 0bd4301709 on Jan 12, 2020
  18. PastaPastaPasta referenced this in commit 013c70d9e6 on Jan 12, 2020
  19. PastaPastaPasta referenced this in commit df244910f0 on Jan 12, 2020
  20. PastaPastaPasta referenced this in commit f891dcf04f on Jan 12, 2020
  21. PastaPastaPasta referenced this in commit 6917a7552e on Jan 12, 2020
  22. PastaPastaPasta referenced this in commit 5f7eebec51 on Jan 16, 2020
  23. ckti referenced this in commit cc1a4b84a1 on Mar 28, 2021
  24. furszy referenced this in commit 60d36292bc on Jul 26, 2021
  25. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me