diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-25 23:11:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-25 23:11:13 +0000 |
commit | b090a6fa34465ffeffdc186b9359d4320637592c (patch) | |
tree | 5273f5ce4918a45a5037f18f65727ee0477b2c7a /usr.bin/last/last.c | |
parent | 7b19a97c25589df244ab90fbe03b7509f61ac0ff (diff) |
incorrect type for variable; enami@but-b.or.jp
Diffstat (limited to 'usr.bin/last/last.c')
-rw-r--r-- | usr.bin/last/last.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index 8ef537c5f2f..3b17be8fe4f 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -1,4 +1,4 @@ -/* $OpenBSD: last.c,v 1.7 1997/08/21 05:46:56 deraadt Exp $ */ +/* $OpenBSD: last.c,v 1.8 1997/08/25 23:11:12 deraadt Exp $ */ /* $NetBSD: last.c,v 1.6 1994/12/24 16:49:02 cgd Exp $ */ /* @@ -44,7 +44,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.7 1997/08/21 05:46:56 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: last.c,v 1.8 1997/08/25 23:11:12 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -227,7 +227,8 @@ wtmp() struct utmp *bp; /* current structure */ TTY *T; /* tty list entry */ struct stat stb; /* stat of file for size */ - time_t bl, delta; /* time difference */ + time_t delta; /* time difference */ + off_t bl; int timesize; /* how long time string gonna be */ int bytes, wfd; char *ct, *crmsg; @@ -246,7 +247,7 @@ wtmp() (void)signal(SIGQUIT, onintr); while (--bl >= 0) { - if (lseek(wfd, (off_t)(bl * sizeof(buf)), L_SET) == -1 || + if (lseek(wfd, bl * sizeof(buf), L_SET) == -1 || (bytes = read(wfd, buf, sizeof(buf))) == -1) err(1, "%s", file); for (bp = &buf[bytes / sizeof(buf[0]) - 1]; bp >= buf; --bp) { |