summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2024-03-11 01:59:34 -0500
committerzachir <zachir@librem.one>2024-03-11 01:59:34 -0500
commit45933ed41766da5e08b59f970ff58df63eb18c8b (patch)
tree44fe2ba0cec9f75a2e3f285e6adf5f85b77f6384
parent934a7be0be6764c8b47aedbf6aad22654d3bd3f2 (diff)
Prints help msg when no args
When no args are provided, even will now print the help message and return -1.
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index ecb79e8..e415020 100644
--- a/src/main.c
+++ b/src/main.c
@@ -58,6 +58,9 @@ int main(int argc, char **argv) {
result = strtol(argv[i], &output, 10);
value = true;
}
+ } else {
+ printhelp();
+ return ERR;
}
if (value) {
if (result % 2 == 0) {