From 3897f44cf8c4379067316415459d2449f014ea70 Mon Sep 17 00:00:00 2001 From: DTB Date: Wed, 3 Jul 2024 15:46:11 -0600 Subject: [PATCH] dj(1): prefix getopt optstring with : --- src/dj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dj.c b/src/dj.c index 41fd65f..f938ca9 100644 --- a/src/dj.c +++ b/src/dj.c @@ -279,7 +279,7 @@ int main(int argc, char *argv[]){ int c; program_name = argv[0]; - while((c = getopt(argc, argv, "a:b:B:c:i:hHns:S:o:")) != -1) + while((c = getopt(argc, argv, ":a:b:B:c:i:hHns:S:o:")) != -1) switch(c){ case 'i': case 'o': i = (c == 'o'); if(optarg[0] == '-' && optarg[1] == '\0'){ /* optarg == "-" */