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.
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-
theStack commented at 12:56 PM on February 14, 2025: contributor
-
965393fcea
examples: use `EXIT_...` constants for `main` return values
Fixes issue #1609.
-
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.
stratospher commented at 4:58 PM on February 14, 2025: contributorACK 6724f99.
test, bench, precompute_ecmult: use `EXIT_...` constants for `main` return values c855581728CONTRIBUTING: mention that `EXIT_` codes should be used 13d389629atheStack force-pushed on Feb 14, 2025jonasnick approvedjonasnick commented at 9:26 AM on February 18, 2025: contributorACK 13d389629aba2c686798a856332c00c6934cacd5
real-or-random approvedreal-or-random commented at 8:55 AM on February 24, 2025: contributorutACK 13d389629aba2c686798a856332c00c6934cacd5
real-or-random merged this on Feb 24, 2025real-or-random closed this on Feb 24, 2025theStack 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: 2026-04-22 22:15 UTC
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-04-22 22:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me