From b1b5c46668385e8021e2b1faf569b1bea27e769a Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sun, 30 Jul 2023 18:48:36 +0200 Subject: [PATCH] Use ZUSTR2STP() instead of its pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Christian Göttsche Cc: Serge Hallyn Cc: Iker Pedrosa Signed-off-by: Alejandro Colomar --- lib/utmp.c | 2 +- src/logoutd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utmp.c b/lib/utmp.c index f202abe3..aa837ffb 100644 --- a/lib/utmp.c +++ b/lib/utmp.c @@ -246,7 +246,7 @@ static } else if ( (NULL != ut) && ('\0' != ut->ut_host[0])) { hostname = XMALLOC(SIZEOF_ARRAY(ut->ut_host) + 1, char); - zustr2stp(hostname, ut->ut_host, SIZEOF_ARRAY(ut->ut_host)); + ZUSTR2STP(hostname, ut->ut_host); #endif /* HAVE_STRUCT_UTMP_UT_HOST */ } diff --git a/src/logoutd.c b/src/logoutd.c index 2612a178..8906ad11 100644 --- a/src/logoutd.c +++ b/src/logoutd.c @@ -46,7 +46,7 @@ static int check_login (const struct utmp *ut) char user[sizeof (ut->ut_user) + 1]; time_t now; - zustr2stp(user, ut->ut_user, SIZEOF_ARRAY(ut->ut_user)); + ZUSTR2STP(user, ut->ut_user); (void) time (&now); @@ -224,7 +224,7 @@ int main (int argc, char **argv) kill (-ut->ut_pid, SIGKILL); } - zustr2stp(user, ut->ut_user, SIZEOF_ARRAY(ut->ut_user)); + ZUSTR2STP(user, ut->ut_user); SYSLOG ((LOG_NOTICE, "logged off user '%s' on '%s'", user,