projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08fd60e
)
(copy_internal): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'.
author
Jim Meyering
<jim@meyering.net>
Sun, 2 Nov 2003 20:17:04 +0000
(20:17 +0000)
committer
Jim 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
patch
|
blob
|
history
diff --git
a/src/copy.c
b/src/copy.c
index
392a450
..
2ccba22
100644
(file)
--- a/
src/copy.c
+++ b/
src/copy.c
@@
-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;