From: Alejandro Colomar Date: Sat, 4 Feb 2023 20:43:43 +0000 (+0100) Subject: Use xcalloc(3) instead of its pattern X-Git-Tag: 4.14.0-rc1~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=727275a0270bdfee0fb269319cee139bfd597b0c;p=thirdparty%2Fshadow.git Use xcalloc(3) instead of its pattern Signed-off-by: Alejandro Colomar --- diff --git a/libmisc/utmp.c b/libmisc/utmp.c index 1fb8fee3a..1ae9fd54a 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