summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-05-03 02:38:50 +0000
committerJim Meyering <jim@meyering.net>1999-05-03 02:38:50 +0000
commit4f40ac7422749e474c0ce7489848d7f6d5afa260 (patch)
tree2c2edba1d74fdc603672fba45d4cd8f6eaf00e8d /lib
parent1610efe2fdfcad1447915ae2e525d9463665f140 (diff)
downloadcoreutils-4f40ac7422749e474c0ce7489848d7f6d5afa260.tar.xz
(read_utmp): Ignore the return value from utmpname.
Diffstat (limited to 'lib')
-rw-r--r--lib/readutmp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/readutmp.c b/lib/readutmp.c
index f2fd7f933..9fb4442c3 100644
--- a/lib/readutmp.c
+++ b/lib/readutmp.c
@@ -66,8 +66,11 @@ read_utmp (const char *filename, int *n_entries, STRUCT_UTMP **utmp_buf)
STRUCT_UTMP *u;
STRUCT_UTMP *utmp = NULL;
- if (utmpname (filename))
- return 1;
+ /* Ignore the return value for now.
+ 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);
setutent ();