]> 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:03:42 +0000 (16:03 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 17 Aug 2003 16:03:42 +0000 (16:03 +0000)
(print_entry): Likewise.

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

src/pinky.c

index 827112a2a0b5ade84b5861f90167021b0a8e8a7b..77aad7e5faafd6a228156500df2950eb6d1656ec 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU's pinky.
-   Copyright (C) 1992-1997, 1999-2002 Free Software Foundation, Inc.
+   Copyright (C) 1992-1997, 1999-2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -259,7 +259,7 @@ print_entry (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';