about summary refs log tree commit diff
path: root/login/getutline_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'login/getutline_r.c')
-rw-r--r--login/getutline_r.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/login/getutline_r.c b/login/getutline_r.c
index 62c8c2fd66..84c77cb244 100644
--- a/login/getutline_r.c
+++ b/login/getutline_r.c
@@ -53,7 +53,8 @@ getutline_r (const struct utmp *line, struct utmp **utmp,
       /* Update position pointer.  */
       utmp_data->loc_utmp += sizeof (struct utmp);
     }
-  while (line->ut_line != utmp_data->ubuf.ut_line);
+  while (strncmp (line->ut_line, utmp_data->ubuf.ut_line,
+		  sizeof line->ut_line));
 
   *utmp = &utmp_data->ubuf;