From f4ea04b72861b4eae72b07344c950e64cd3966f2 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 20 Feb 2024 19:06:49 +0100 Subject: [PATCH] lib/utmp.c: Indent nested preprocessor conditionals Reviewed-by: Iker Pedrosa Signed-off-by: Alejandro Colomar --- lib/utmp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/utmp.c b/lib/utmp.c index 388383e92..4f41b60ff 100644 --- a/lib/utmp.c +++ b/lib/utmp.c @@ -209,7 +209,7 @@ get_session_host(char **out) * Some systems already have updwtmpx(). Others * don't, so we re-implement these functions if necessary. */ -#ifndef HAVE_UPDWTMPX +# ifndef HAVE_UPDWTMPX static void updwtmpx(const char *filename, const struct utmpx *ut) { @@ -221,7 +221,7 @@ updwtmpx(const char *filename, const struct utmpx *ut) close (fd); } } -#endif /* ! HAVE_UPDWTMPX */ +# endif /* ! HAVE_UPDWTMPX */ #endif /* ! USE_PAM */ @@ -306,13 +306,13 @@ prepare_utmp(const char *name, const char *line, const char *host, if (info->ai_family == AF_INET) { struct sockaddr_in *sa = (struct sockaddr_in *) info->ai_addr; -#ifdef HAVE_STRUCT_UTMP_UT_ADDR +# ifdef HAVE_STRUCT_UTMP_UT_ADDR memcpy (&(utent->ut_addr), &(sa->sin_addr), MIN (sizeof (utent->ut_addr), sizeof (sa->sin_addr))); -#endif /* HAVE_STRUCT_UTMP_UT_ADDR */ -#ifdef HAVE_STRUCT_UTMP_UT_ADDR_V6 +# endif /* HAVE_STRUCT_UTMP_UT_ADDR */ +# ifdef HAVE_STRUCT_UTMP_UT_ADDR_V6 memcpy (utent->ut_addr_v6, &(sa->sin_addr), MIN (sizeof (utent->ut_addr_v6), @@ -324,7 +324,7 @@ prepare_utmp(const char *name, const char *line, const char *host, &(sa->sin6_addr), MIN (sizeof (utent->ut_addr_v6), sizeof (sa->sin6_addr))); -#endif /* HAVE_STRUCT_UTMP_UT_ADDR_V6 */ +# endif /* HAVE_STRUCT_UTMP_UT_ADDR_V6 */ } freeaddrinfo (info); } -- 2.47.2