summaryrefslogtreecommitdiff
path: root/usr.bin/last/last.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-01-08 13:36:53 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-01-08 13:36:53 +0000
commitcf978fce6b3a544c2de7476b9f65f7e0352d4a72 (patch)
treee80aa63158d23564442c9a545a1305da6536d83b /usr.bin/last/last.c
parent7267dc52011999245738d9e17a1c016e28768ec3 (diff)
Fix uninitialized variable. From Ilya Voronin <ivoronin at trancom dot ru>
Diffstat (limited to 'usr.bin/last/last.c')
-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 fcceef4c0bc..ebc45e2f839 100644
--- a/usr.bin/last/last.c
+++ b/usr.bin/last/last.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: last.c,v 1.29 2003/11/09 20:13:57 otto Exp $ */
+/* $OpenBSD: last.c,v 1.30 2004/01/08 13:36:52 otto Exp $ */
/* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)last.c 8.2 (Berkeley) 4/2/94";
#endif
-static char rcsid[] = "$OpenBSD: last.c,v 1.29 2003/11/09 20:13:57 otto Exp $";
+static char rcsid[] = "$OpenBSD: last.c,v 1.30 2004/01/08 13:36:52 otto Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -231,7 +231,7 @@ wtmp(void)
TTY *T; /* tty list entry */
struct stat stb; /* stat of file for size */
time_t delta; /* time difference */
- time_t total;
+ time_t total = 0;
off_t bl;
int timesize; /* how long time string gonna be */
int bytes, wfd;