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, 2025hebasto referenced this in commit 0ee5708432 on Mar 10, 2025hebasto referenced this in commit dd59896431 on Mar 17, 2025fjahr referenced this in commit cd1404164e on Mar 23, 2025hebasto referenced this in commit 017ff1c67c on May 8, 2025hebasto referenced this in commit c31fcaaad3 on May 13, 2025fanquake referenced this in commit 8309a9747a on May 13, 2025vmta referenced this in commit 3a0314c68f on May 22, 2025janus referenced this in commit 498ffcb50b on Sep 7, 2025DarkWindman referenced this in commit 394e37fc72 on Feb 12, 2026mllwchrry referenced this in commit 5052ea41d0 on Feb 13, 2026mllwchrry referenced this in commit 53c6f04ee1 on Feb 17, 2026DarkWindman referenced this in commit 8d345364a1 on Feb 17, 2026DarkWindman referenced this in commit 315d214ca8 on Feb 18, 2026DarkWindman referenced this in commit a307800195 on Feb 19, 2026real-or-random referenced this in commit 2d30d398f9 on Feb 20, 2026github-actions[bot] referenced this in commit 758d4e90b4 on Mar 1, 2026github-actions[bot] referenced this in commit 68a2178f22 on Mar 1, 2026github-actions[bot] referenced this in commit a8bc1a0b2b on Mar 1, 20260x000000000019d6689c085ae165831e934ff76 referenced this in commit 3b9450150d on Mar 2, 2026csjones 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
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