aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-22 20:09:18 -0500
committerDavid Robillard <d@drobilla.net>2024-11-24 20:42:51 -0500
commit7a03d6bacbec2ac275673314c8a274d5208943b3 (patch)
treed7738ec954f91aec3441199a3f6ed992c608fdc3 /src/main.c
parentd32dce07f6f0848160b3abbc3fe34828f650c338 (diff)
downloadjalv-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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index cf88af2..5c49b10 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;
}