summaryrefslogtreecommitdiff
path: root/usr.bin/last
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-02-08 23:40:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-02-08 23:40:36 +0000
commit7105f3a882af27b3a37d2e5b22e6555a061b7657 (patch)
treeeb4becb775bdf83fd9b483cca8c46ea157be2ac2 /usr.bin/last
parent0c4a701fd12c657a080bb6eda7d167bb78f0e79e (diff)
in getopt() blocks, stop incrementing flag variable which are supposed
to just be 0/1 ok miod florian
Diffstat (limited to 'usr.bin/last')
-rw-r--r--usr.bin/last/last.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c
index 954ffbd6cfc..6df6fc915b9 100644
--- a/usr.bin/last/last.c
+++ b/usr.bin/last/last.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: last.c,v 1.45 2015/01/16 06:40:09 deraadt Exp $ */
+/* $OpenBSD: last.c,v 1.46 2015/02/08 23:40:34 deraadt Exp $ */
/* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */
/*
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
maxrec = (maxrec * 10) + (ch - '0');
break;
case 'c':
- calculate++;
+ calculate = 1;
break;
case 'f':
file = optarg;
@@ -130,7 +130,7 @@ main(int argc, char *argv[])
exit(0);
break;
case 's':
- seconds++;
+ seconds = 1;
break;
case 't':
addarg(TTY_TYPE, ttyconv(optarg));