]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Avoid unnecessary and sometimes time-consuming hostname lookups.
authorJim Meyering <jim@meyering.net>
Sun, 17 Aug 2003 16:04:00 +0000 (16:04 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 17 Aug 2003 16:04:00 +0000 (16:04 +0000)
(print_user): Likewise.

This fixes a typo I introduced in who-users.c on 1996-02-23.

src/who.c

index a3bb7d2efa64f4f9ac91d0720eb0d897b31b4b7d..fa418521cd7733e8370609e452206449ac371c75 100644 (file)
--- 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';