From e24c3052820ab8042d2cf9f31a47e0d7f64b9ba0 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 25 Mar 1997 21:28:12 +0000 Subject: [PATCH] correct string empty test; yokota@freebsd --- usr.bin/who/who.c | 6 +++--- 1 file 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 @@ -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; } -- 2.20.1