mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
(getutline_r): When we return ESRCH, mark UTMP_DATA->ubuf invalid (by setting UTMP_DATA->loc_utmp to 0).
This commit is contained in:
parent
e33b438a84
commit
eb6c848027
@ -47,6 +47,7 @@ getutline_r (const struct utmp *line, struct utmp **utmp,
|
||||
if (read (utmp_data->ut_fd, &utmp_data->ubuf, sizeof (struct utmp))
|
||||
!= sizeof (struct utmp))
|
||||
{
|
||||
utmp_data->loc_utmp = 0; /* Mark UTMP_DATA->ubuf invalid. */
|
||||
errno = ESRCH;
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user