]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(list_entries_users): Use xnmalloc, rather than xmalloc.
authorJim Meyering <jim@meyering.net>
Thu, 6 May 2004 14:49:32 +0000 (14:49 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 6 May 2004 14:49:32 +0000 (14:49 +0000)
src/users.c

index 733024af1341704716597e5064d36a8c71895f2b..e1772d91419c459d0b4d925c8ff1fbfd7440e25b 100644 (file)
@@ -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]