From a288ccca566f623ed98ea69ee0c40ff79a658cf3 Mon Sep 17 00:00:00 2001 From: Steve Price Date: Mon, 9 Nov 1998 01:19:30 +0000 Subject: [PATCH] Do a better job of determining if we were called as uptime(1). PR: 8593 --- usr.bin/w/w.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index a10275286b3..44d8009fc8d 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94"; #endif static const char rcsid[] = - "$Id: w.c,v 1.27 1998/05/21 08:46:48 jkoshy Exp $"; + "$Id: w.c,v 1.28 1998/06/09 04:35:20 imp Exp $"; #endif /* not lint */ /* @@ -141,10 +141,7 @@ main(argc, argv) (void) setlocale(LC_ALL, ""); /* Are we w(1) or uptime(1)? */ - p = __progname; - if (*p == '-') - p++; - if (*p == 'u') { + if (strstr(__progname, "uptime")) { wcmd = 0; p = ""; } else {