This commit is contained in:
cgd 1994-04-01 03:06:40 +00:00
parent 6c3c466fe7
commit f74f70059d
2 changed files with 4 additions and 6 deletions

View File

@ -33,7 +33,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "from: @(#)login.c 5.4 (Berkeley) 6/1/90";*/
static char rcsid[] = "$Id: login.c,v 1.2 1993/08/01 18:31:54 mycroft Exp $";
static char rcsid[] = "$Id: login.c,v 1.3 1994/04/01 03:06:40 cgd Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@ -47,11 +47,10 @@ login(ut)
{
register int fd;
int tty;
off_t lseek();
tty = ttyslot();
if (tty > 0 && (fd = open(_PATH_UTMP, O_WRONLY|O_CREAT, 0644)) >= 0) {
(void)lseek(fd, (long)(tty * sizeof(struct utmp)), L_SET);
(void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), L_SET);
(void)write(fd, (char *)ut, sizeof(struct utmp));
(void)close(fd);
}

View File

@ -33,7 +33,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "from: @(#)logout.c 5.5 (Berkeley) 6/1/90";*/
static char rcsid[] = "$Id: logout.c,v 1.2 1993/08/01 18:31:50 mycroft Exp $";
static char rcsid[] = "$Id: logout.c,v 1.3 1994/04/01 03:06:41 cgd Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@ -49,7 +49,6 @@ logout(line)
register int fd;
UTMP ut;
int rval;
off_t lseek();
time_t time();
if ((fd = open(_PATH_UTMP, O_RDWR)) < 0)
@ -61,7 +60,7 @@ logout(line)
bzero(ut.ut_name, UT_NAMESIZE);
bzero(ut.ut_host, UT_HOSTSIZE);
(void)time(&ut.ut_time);
(void)lseek(fd, -(long)sizeof(UTMP), L_INCR);
(void)lseek(fd, -(off_t)sizeof(UTMP), L_INCR);
(void)write(fd, (char *)&ut, sizeof(UTMP));
rval = 1;
}