=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/login/login.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- src/usr.bin/login/login.c 1996/11/09 06:39:41 1.11 +++ src/usr.bin/login/login.c 1996/11/09 07:43:22 1.12 @@ -1,4 +1,4 @@ -/* $OpenBSD: login.c,v 1.11 1996/11/09 06:39:41 millert Exp $ */ +/* $OpenBSD: login.c,v 1.12 1996/11/09 07:43:22 millert Exp $ */ /* $NetBSD: login.c,v 1.13 1996/05/15 23:50:16 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ #if 0 static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; #endif -static char rcsid[] = "$OpenBSD: login.c,v 1.11 1996/11/09 06:39:41 millert Exp $"; +static char rcsid[] = "$OpenBSD: login.c,v 1.12 1996/11/09 07:43:22 millert Exp $"; #endif /* not lint */ /* @@ -115,7 +115,7 @@ struct passwd *pwd; int failures; -char term[64], *envinit[1], *hostname, *username, *tty; +char term[64], *envinit[1], *hostname, *tty, *username = NULL; int main(argc, argv) @@ -198,7 +198,7 @@ (void)snprintf(tname, sizeof(tname), "%s??", _PATH_TTY); ttyn = tname; } - if (tty = strrchr(ttyn, '/')) + if ((tty = strrchr(ttyn, '/'))) ++tty; else tty = ttyn; @@ -243,7 +243,7 @@ } (void)strcpy(tbuf, username); - if (pwd = getpwnam(username)) + if ((pwd = getpwnam(username))) salt = pwd->pw_passwd; else salt = "xx";