diff options
| author | zachir <zachir@librem.one> | 2024-03-11 01:59:34 -0500 |
|---|---|---|
| committer | zachir <zachir@librem.one> | 2024-03-11 01:59:34 -0500 |
| commit | 45933ed41766da5e08b59f970ff58df63eb18c8b (patch) | |
| tree | 44fe2ba0cec9f75a2e3f285e6adf5f85b77f6384 | |
| parent | 934a7be0be6764c8b47aedbf6aad22654d3bd3f2 (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |
