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

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: 2025-03-09 14:15 UTC

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