summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2015-02-09 11:35:41 +0000
committertedu <tedu@openbsd.org>2015-02-09 11:35:41 +0000
commit839771425760f90f0e3a6f52c8078050a976542e (patch)
treee0935953efccc24516a542ebfbb19ef59fc30c84
parentstop trying to workaround malloc bugs that have not existed for 20 years. (diff)
downloadwireguard-openbsd-839771425760f90f0e3a6f52c8078050a976542e.tar.xz
wireguard-openbsd-839771425760f90f0e3a6f52c8078050a976542e.zip
errflg only needs to go to 1
-rw-r--r--usr.bin/deroff/deroff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/deroff/deroff.c b/usr.bin/deroff/deroff.c
index 6b50bc14f28..0f80d110b0a 100644
--- a/usr.bin/deroff/deroff.c
+++ b/usr.bin/deroff/deroff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: deroff.c,v 1.9 2014/12/03 16:44:55 millert Exp $ */
+/* $OpenBSD: deroff.c,v 1.10 2015/02/09 11:35:41 tedu Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -300,11 +300,11 @@ main(int ac, char **av)
disp = YES;
break;
default:
- errflg++;
+ errflg = 1;
break;
}
- if (errflg == 0 && optarg[1] != '\0')
- errflg++;
+ if (optarg[1] != '\0')
+ errflg = 1;
break;
case 'p':
parag = YES;
@@ -314,7 +314,7 @@ main(int ac, char **av)
kflag = YES;
break;
default:
- errflg++;
+ errflg = 1;
}
}
argc = ac - optind;