]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/utmp.c: Merge preprocessor conditionals
authorAlejandro Colomar <alx@kernel.org>
Tue, 20 Feb 2024 18:09:36 +0000 (19:09 +0100)
committerAlejandro Colomar <alx@kernel.org>
Wed, 21 Feb 2024 14:43:25 +0000 (15:43 +0100)
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/utmp.c

index 4f41b60ffd520db86859c79c25ceb04cedd1aefc..e5dfb3f044531fba3aa1ccf7172e20059ead9818 100644 (file)
@@ -204,12 +204,11 @@ get_session_host(char **out)
 }
 
 
-#ifndef USE_PAM
+#if !defined(USE_PAM) && !defined(HAVE_UPDWTMPX)
 /*
  * Some systems already have updwtmpx().  Others
  * don't, so we re-implement these functions if necessary.
  */
-# ifndef HAVE_UPDWTMPX
 static void
 updwtmpx(const char *filename, const struct utmpx *ut)
 {
@@ -221,8 +220,7 @@ updwtmpx(const char *filename, const struct utmpx *ut)
                close (fd);
        }
 }
-# endif                                /* ! HAVE_UPDWTMPX */
-#endif                         /* ! USE_PAM */
+#endif
 
 
 /*