Use xcalloc(3) instead of its pattern

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2023-02-04 21:43:43 +01:00 committed by Serge Hallyn
parent d81506de1e
commit 727275a027

View File

@ -174,9 +174,7 @@ static void updwtmp (const char *filename, const struct utmp *ut)
} }
utent = (struct utmp *) xmalloc (sizeof (*utent)); utent = (struct utmp *) xcalloc (1, sizeof (*utent));
memzero (utent, sizeof (*utent));
#ifdef HAVE_STRUCT_UTMP_UT_TYPE #ifdef HAVE_STRUCT_UTMP_UT_TYPE