summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/who-users.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/who-users.c b/src/who-users.c
index ce9553c72..47298dcc0 100644
--- a/src/who-users.c
+++ b/src/who-users.c
@@ -255,7 +255,7 @@ print_entry (struct utmp *this)
ut_host[sizeof (this->ut_host)] = '\0';
/* Look for an X display. */
- display = index (ut_host, ':');
+ display = strrchr (ut_host, ':');
if (display)
*display++ = '\0';