summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-01-14 16:28:36 -0500
committerJakob Kaivo <jkk@ung.org>2020-01-14 16:28:36 -0500
commitb533431c665381fe178dc8c339c3ef72d9d087c9 (patch)
treefeca0221b56276b56f9b30be95ce7315532c5910
parent56205b5b24cff2f3404bee815a2c8a336b152c1d (diff)
display an error if too many directories are specified
-rw-r--r--maje.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/maje.c b/maje.c
index b04df7f..9ba22c2 100644
--- a/maje.c
+++ b/maje.c
@@ -24,6 +24,11 @@ int main(int argc, char *argv[])
}
}
+ if (optind < argc - 1) {
+ fprintf(stderr, "maje: extra operands\n");
+ return 1;
+ }
+
srcdir = argv[optind];
if (srcdir == NULL) {