1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-24 09:46:52 +02:00

(read_utmp): Use the new definitions.

This commit is contained in:
Jim Meyering
1999-05-05 13:34:18 +00:00
parent b0cc976ab9
commit 9f8bc128f0
+4 -4
View File
@@ -70,12 +70,12 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf)
Solaris' utmpname returns 1 upon success -- which is contrary
to what the GNU libc version does. In addition, older GNU libc
versions are actually void. */
utmpname (filename);
UTMP_NAME_FUNCTION (filename);
setutent ();
SET_UTMP_ENT ();
n_read = 0;
while ((u = getutent ()) != NULL)
while ((u = GET_UTMP_ENT ()) != NULL)
{
++n_read;
utmp = (STRUCT_UTMP *) realloc (utmp, n_read * sizeof (STRUCT_UTMP));
@@ -84,7 +84,7 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf)
utmp[n_read - 1] = *u;
}
endutent ();
END_UTMP_ENT ();
*n_entries = n_read;
*utmp_buf = utmp;