diff options
author | David Robillard <d@drobilla.net> | 2024-11-22 20:09:18 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-24 20:42:51 -0500 |
commit | 7a03d6bacbec2ac275673314c8a274d5208943b3 (patch) | |
tree | d7738ec954f91aec3441199a3f6ed992c608fdc3 /src/main.c | |
parent | d32dce07f6f0848160b3abbc3fe34828f650c338 (diff) | |
download | jalv-7a03d6bacbec2ac275673314c8a274d5208943b3.tar.gz jalv-7a03d6bacbec2ac275673314c8a274d5208943b3.tar.bz2 jalv-7a03d6bacbec2ac275673314c8a274d5208943b3.zip |
Make help and version commands exit successfully
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -53,9 +53,10 @@ main(int argc, char** argv) jalv.backend = jalv_backend_allocate(); // Initialize application - if (jalv_open(&jalv, &argc, &argv)) { + const int orc = jalv_open(&jalv, &argc, &argv); + if (orc) { jalv_close(&jalv); - return EXIT_FAILURE; + return orc == JALV_EARLY_EXIT_STATUS ? EXIT_SUCCESS : EXIT_FAILURE; } // Set up signal handlers and activate audio processing @@ -70,7 +71,7 @@ main(int argc, char** argv) // Deactivate audio processing and tear down application jalv_deactivate(&jalv); - const int ret = jalv_close(&jalv); + const int crc = jalv_close(&jalv); jalv_backend_free(jalv.backend); - return ret; + return crc; } |