summaryrefslogtreecommitdiff
path: root/src/who.c
diff options
context:
space:
mode:
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 e9e962898..7cbe51807 100644
--- a/src/who.c
+++ b/src/who.c
@@ -150,7 +150,7 @@ extract_trimmed_name (const STRUCT_UTMP *ut)
/* Append a trailing space character. Some systems pad names shorter than
the maximum with spaces, others pad with NULs. Remove any spaces. */
trimmed_name[sizeof (ut->ut_name)] = ' ';
- p = index (trimmed_name, ' ');
+ p = strchr (trimmed_name, ' ');
if (p != NULL)
*p = '\0';
return trimmed_name;