aboutsummaryrefslogtreecommitdiff
path: root/login/utmpname.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-08-05 15:54:10 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-08-05 15:55:05 +0200
commit1a7fe2ebe52b3c8bf465d1756e69452d05c1c103 (patch)
tree1d32b2e5a5c55d660354cefb1b02918b62127300 /login/utmpname.c
parenta6c1ce778e5c05a2e6925883b410157ef47654fd (diff)
downloadglibc-1a7fe2ebe52b3c8bf465d1756e69452d05c1c103.tar
glibc-1a7fe2ebe52b3c8bf465d1756e69452d05c1c103.tar.gz
glibc-1a7fe2ebe52b3c8bf465d1756e69452d05c1c103.tar.bz2
glibc-1a7fe2ebe52b3c8bf465d1756e69452d05c1c103.zip
login: Remove utmp backend jump tables [BZ #23518]
There is just one file-based implementation, so this dispatch mechanism is unnecessary. Instead of the vtable pointer __libc_utmp_jump_table, use a non-negative file_fd as the indicator that the backend is initialized.
Diffstat (limited to 'login/utmpname.c')
-rw-r--r--login/utmpname.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/login/utmpname.c b/login/utmpname.c
index c3da183d5b..8f94b19caf 100644
--- a/login/utmpname.c
+++ b/login/utmpname.c
@@ -42,8 +42,7 @@ __utmpname (const char *file)
__libc_lock_lock (__libc_utmp_lock);
/* Close the old file. */
- (*__libc_utmp_jump_table->endutent) ();
- __libc_utmp_jump_table = &__libc_utmp_unknown_functions;
+ __libc_endutent ();
if (strcmp (file, __libc_utmp_file_name) != 0)
{