summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-03-25 21:28:12 +0000
committerderaadt <deraadt@openbsd.org>1997-03-25 21:28:12 +0000
commite24c3052820ab8042d2cf9f31a47e0d7f64b9ba0 (patch)
tree00c76061b4ca987aada891731ead762db91f42bc
parentensure strftime buf has NUL; yokota@freebsd (diff)
downloadwireguard-openbsd-e24c3052820ab8042d2cf9f31a47e0d7f64b9ba0.tar.xz
wireguard-openbsd-e24c3052820ab8042d2cf9f31a47e0d7f64b9ba0.zip
correct string empty test; yokota@freebsd
-rw-r--r--usr.bin/who/who.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/who/who.c b/usr.bin/who/who.c
index cf32afd62fb..2a37912bdbc 100644
--- a/usr.bin/who/who.c
+++ b/usr.bin/who/who.c
@@ -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;
}