From 098e5c4faa45197861440631347928296bb28147 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 30 Mar 2024 03:19:09 +0400 Subject: [PATCH] Compacted switch to check a result of parse_argv(). --- src/main.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main.c b/src/main.c index 6dae1b1..637a00a 100644 --- a/src/main.c +++ b/src/main.c @@ -47,15 +47,9 @@ int main(int argc, const char **argv) { result = parse_argv(argc, argv, &opts); switch (result) { - case -1: - usage(); - return 1; - case -2: - version(); - return 0; - case -3: - usage(); - return 0; + case -1: usage(); return 1; + case -2: version(); return 0; + case -3: usage(); return 0; } if (sodium_init() == -1) {