aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-11-26 07:48:04 -0500
committerB. Watson <urchlay@slackware.uk>2025-11-26 07:48:04 -0500
commit5f52b199a88fa30729ddab53924db4d4da6368c9 (patch)
tree89d75a435425c36a73ad0bab823caf01904e0600
parentd3f6689328d52e5d236fbf0993d47d11905546f6 (diff)
downloadunalf-5f52b199a88fa30729ddab53924db4d4da6368c9.tar.gz
Get rid of double "invalid option" errors in alf.
-rw-r--r--src/alf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/alf.c b/src/alf.c
index 8fedb20..be47344 100644
--- a/src/alf.c
+++ b/src/alf.c
@@ -311,6 +311,9 @@ int main(int argc, char **argv) {
usage();
}
+ /* don't let getopt() print error message for us. */
+ opterr = 0;
+
while((opt = getopt(argc, argv, "ao")) != -1) {
switch(opt) {
case 'a': opt_append = 1; opt_overwrite = 1; break;