]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Use xcalloc(3) instead of its pattern
authorAlejandro Colomar <alx@kernel.org>
Sat, 4 Feb 2023 20:43:43 +0000 (21:43 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 24 Feb 2023 02:28:43 +0000 (20:28 -0600)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
libmisc/utmp.c

index 1fb8fee3afd913a82e04e4a97b32dddce359c0d0..1ae9fd54ad376374cb4744146041967679dbf614 100644 (file)
@@ -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