(getutline_r): When we return ESRCH, mark UTMP_DATA->ubuf invalid (by setting UTMP_DATA->loc_utmp to 0).

This commit is contained in:
Miles Bader 1996-07-05 23:48:41 +00:00
parent e33b438a84
commit eb6c848027
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}