use `EXIT_` constants over magic numbers for indicating program execution status #1654

pull theStack wants to merge 3 commits into bitcoin-core:master from theStack:use-exit_-constants changing 15 files +62 −50
  1. theStack commented at 12:56 PM on February 14, 2025: contributor

    This simple PR addresses #1609 for all example and internal binaries. Alternative to #1618, which is stale (the author confirmed to me that they are not working on that PR anymore). The last commits adds a suggestion to CONTRIBUTING.md, not sure though if we want to go that far.

  2. examples: use `EXIT_...` constants for `main` return values
    Fixes issue #1609.
    965393fcea
  3. in src/bench_ecmult.c:303 in 6820e54062 outdated
     299 | @@ -299,7 +300,7 @@ int main(int argc, char **argv) {
     300 |          } else {
     301 |              fprintf(stderr, "%s: unrecognized argument '%s'.\n\n", argv[0], argv[1]);
     302 |              help(argv);
     303 | -            return 1;
     304 | +            return EXIT_FAILURE;
    


    stratospher commented at 4:40 PM on February 14, 2025:

    6820e54: there's also an EXIT_SUCCESS few lines above for --help.


    theStack commented at 5:05 PM on February 14, 2025:

    Good catch, missed that one! Done.

  4. stratospher commented at 4:58 PM on February 14, 2025: contributor

    ACK 6724f99.

  5. test, bench, precompute_ecmult: use `EXIT_...` constants for `main` return values c855581728
  6. CONTRIBUTING: mention that `EXIT_` codes should be used 13d389629a
  7. theStack force-pushed on Feb 14, 2025
  8. jonasnick approved
  9. jonasnick commented at 9:26 AM on February 18, 2025: contributor

    ACK 13d389629aba2c686798a856332c00c6934cacd5

  10. real-or-random approved
  11. real-or-random commented at 8:55 AM on February 24, 2025: contributor

    utACK 13d389629aba2c686798a856332c00c6934cacd5

  12. real-or-random merged this on Feb 24, 2025
  13. real-or-random closed this on Feb 24, 2025

  14. theStack deleted the branch on Feb 24, 2025
  15. hebasto referenced this in commit 0ee5708432 on Mar 10, 2025
  16. hebasto referenced this in commit dd59896431 on Mar 17, 2025
  17. fjahr referenced this in commit cd1404164e on Mar 23, 2025
  18. hebasto referenced this in commit 017ff1c67c on May 8, 2025
  19. hebasto referenced this in commit c31fcaaad3 on May 13, 2025
  20. fanquake referenced this in commit 8309a9747a on May 13, 2025
  21. vmta referenced this in commit 3a0314c68f on May 22, 2025
  22. janus referenced this in commit 498ffcb50b on Sep 7, 2025
  23. DarkWindman referenced this in commit 394e37fc72 on Feb 12, 2026
  24. mllwchrry referenced this in commit 5052ea41d0 on Feb 13, 2026
  25. mllwchrry referenced this in commit 53c6f04ee1 on Feb 17, 2026
  26. DarkWindman referenced this in commit 8d345364a1 on Feb 17, 2026
  27. DarkWindman referenced this in commit 315d214ca8 on Feb 18, 2026
  28. DarkWindman referenced this in commit a307800195 on Feb 19, 2026
  29. real-or-random referenced this in commit 2d30d398f9 on Feb 20, 2026
  30. github-actions[bot] referenced this in commit 758d4e90b4 on Mar 1, 2026
  31. github-actions[bot] referenced this in commit 68a2178f22 on Mar 1, 2026
  32. github-actions[bot] referenced this in commit a8bc1a0b2b on Mar 1, 2026
  33. 0x000000000019d6689c085ae165831e934ff76 referenced this in commit 3b9450150d on Mar 2, 2026
  34. csjones referenced this in commit a4d92824ae on Mar 2, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:52 UTC