]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(copy_internal): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'.
authorJim Meyering <jim@meyering.net>
Sun, 2 Nov 2003 20:17:04 +0000 (20:17 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 2 Nov 2003 20:17:04 +0000 (20:17 +0000)
The former is more maintainable and usually shorter.

src/copy.c

index 392a450645dc01225755661dec206e564cc1b40b..2ccba222aa040b888fa3813601274bda543acf91 100644 (file)
@@ -1306,7 +1306,7 @@ copy_internal (const char *src_path, const char *dst_path,
 
       /* Insert the current directory in the list of parents.  */
 
-      dir = alloca (sizeof (struct dir_list));
+      dir = alloca (sizeof *dir);
       dir->parent = ancestors;
       dir->ino = src_sb.st_ino;
       dir->dev = src_sb.st_dev;