ckiss

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f4bd236f64fc5ee335077e80056ccfaf834019f9
parent acfc85b9462f978e82e74e8e5e86e6dc0ba9506d
Author: aabacchus <ben@bvnf.space>
Date:   Sun, 23 Apr 2023 05:50:48 +0100

exit main with exit status

Diffstat:
Msrc/main.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -14,6 +14,7 @@ usage(int r) { int main(int argc, char **argv) { + int ret = 0; struct env *e = setup_env(); setup_colors(e); @@ -21,13 +22,13 @@ main(int argc, char **argv) { switch (argv[1][0]) { case 'c': - checksum(argc - 1, argv + 1, e); + ret = checksum(argc - 1, argv + 1, e); break; case 'l': - list(argc - 1, argv + 1, e); + ret = list(argc - 1, argv + 1, e); break; case 's': - search(argc - 1, argv + 1, e); + ret = search(argc - 1, argv + 1, e); break; case 'v': printf("%s\n", KISS_VERSION); @@ -37,5 +38,5 @@ main(int argc, char **argv) { usage(1); } destroy_env(e); - return 0; + return ret; }