From 727275a0270bdfee0fb269319cee139bfd597b0c Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 4 Feb 2023 21:43:43 +0100 Subject: [PATCH] Use xcalloc(3) instead of its pattern Signed-off-by: Alejandro Colomar --- libmisc/utmp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libmisc/utmp.c b/libmisc/utmp.c index 1fb8fee3..1ae9fd54 100644 --- a/libmisc/utmp.c +++ b/libmisc/utmp.c @@ -174,9 +174,7 @@ static void updwtmp (const char *filename, const struct utmp *ut) } - utent = (struct utmp *) xmalloc (sizeof (*utent)); - memzero (utent, sizeof (*utent)); - + utent = (struct utmp *) xcalloc (1, sizeof (*utent)); #ifdef HAVE_STRUCT_UTMP_UT_TYPE