(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 392a450..2ccba22 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;