changeset 5949:9300a4e513e9

(getuser, getuidbyname, getgroup, getgidbyname): Don't apply sizeof to a hard-coded type name. Use the variable name instead.
author Jim Meyering <jim@meyering.net>
date Wed, 29 Jun 2005 21:29:09 +0000
parents f410a15537e7
children 279e70a5ae03
files lib/idcache.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib/idcache.c	Wed Jun 29 21:28:00 2005 +0000
+++ b/lib/idcache.c	Wed Jun 29 21:29:09 2005 +0000
@@ -66,7 +66,7 @@
       return tail->name;
 
   pwent = getpwuid (uid);
-  tail = xmalloc (sizeof (struct userid));
+  tail = xmalloc (sizeof *tail);
   tail->id.u = uid;
   tail->name = pwent ? xstrdup (pwent->pw_name) : NULL;
 
@@ -108,7 +108,7 @@
     }
 #endif
 
-  tail = xmalloc (sizeof (struct userid));
+  tail = xmalloc (sizeof *tail);
   tail->name = xstrdup (user);
 
   /* Add to the head of the list, so most recently used is first.  */
@@ -142,7 +142,7 @@
       return tail->name;
 
   grent = getgrgid (gid);
-  tail = xmalloc (sizeof (struct userid));
+  tail = xmalloc (sizeof *tail);
   tail->id.g = gid;
   tail->name = grent ? xstrdup (grent->gr_name) : NULL;
 
@@ -184,7 +184,7 @@
     }
 #endif
 
-  tail = xmalloc (sizeof (struct userid));
+  tail = xmalloc (sizeof *tail);
   tail->name = xstrdup (group);
 
   /* Add to the head of the list, so most recently used is first.  */