From 1a7fe2ebe52b3c8bf465d1756e69452d05c1c103 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 5 Aug 2019 15:54:10 +0200 Subject: 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. --- login/utmpname.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'login/utmpname.c') 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) { -- cgit 1.4.1