Use xcalloc(3) instead of its pattern
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
d81506de1e
commit
727275a027
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user