summaryrefslogtreecommitdiff
path: root/src/who.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-08-17 16:04:00 +0000
committerJim Meyering <jim@meyering.net>2003-08-17 16:04:00 +0000
commitf976fd6f3866575a115ff6e2afeb91466758e44c (patch)
treef67fd7bbecff01f8259ab860af6f6e5581c0f93a /src/who.c
parent7cea88478707a4ed438fbd17ac3ca2371d3328ee (diff)
downloadcoreutils-f976fd6f3866575a115ff6e2afeb91466758e44c.tar.xz
Avoid unnecessary and sometimes time-consuming hostname lookups.
(print_user): Likewise. This fixes a typo I introduced in who-users.c on 1996-02-23.
Diffstat (limited to 'src/who.c')
-rw-r--r--src/who.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/who.c b/src/who.c
index a3bb7d2ef..fa418521c 100644
--- a/src/who.c
+++ b/src/who.c
@@ -372,7 +372,7 @@ print_user (const STRUCT_UTMP *utmp_ent)
ut_host[sizeof (utmp_ent->ut_host)] = '\0';
/* Look for an X display. */
- display = strrchr (ut_host, ':');
+ display = strchr (ut_host, ':');
if (display)
*display++ = '\0';