From: Jim Meyering Date: Thu, 6 May 2004 14:49:32 +0000 (+0000) Subject: (list_entries_users): Use xnmalloc, rather than xmalloc. X-Git-Tag: v5.3.0~1613 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d9d9f4d027936111684bb0d63eb43a6535cddb1;p=thirdparty%2Fcoreutils.git (list_entries_users): Use xnmalloc, rather than xmalloc. --- diff --git a/src/users.c b/src/users.c index 733024af13..e1772d9141 100644 --- a/src/users.c +++ b/src/users.c @@ -57,7 +57,7 @@ list_entries_users (int n, const STRUCT_UTMP *this) int n_entries; n_entries = 0; - u = xmalloc (n * sizeof (u[0])); + u = xnmalloc (n, sizeof *u); for (i = 0; i < n; i++) { if (UT_USER (this) [0]