mirror of
https://github.com/openbsd/src.git
synced 2025-01-03 06:45:37 -08:00
correct string empty test; yokota@freebsd
This commit is contained in:
parent
62e482e9d3
commit
e24c305282
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: who.c,v 1.3 1997/01/17 07:13:50 millert Exp $ */
|
||||
/* $OpenBSD: who.c,v 1.4 1997/03/25 21:28:12 deraadt Exp $ */
|
||||
/* $NetBSD: who.c,v 1.4 1994/12/07 04:28:49 jtc Exp $ */
|
||||
|
||||
/*
|
||||
@ -47,7 +47,7 @@ static char copyright[] =
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)who.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static char rcsid[] = "$OpenBSD: who.c,v 1.3 1997/01/17 07:13:50 millert Exp $";
|
||||
static char rcsid[] = "$OpenBSD: who.c,v 1.4 1997/03/25 21:28:12 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -151,7 +151,7 @@ who_am_i(ufp)
|
||||
if (t = strrchr(p, '/'))
|
||||
p = t + 1;
|
||||
while (fread((char *)&usr, sizeof(usr), 1, ufp) == 1)
|
||||
if (usr.ut_name && !strcmp(usr.ut_line, p)) {
|
||||
if (*usr.ut_name && !strcmp(usr.ut_line, p)) {
|
||||
output(&usr);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user