summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-11-02 20:17:46 +0000
committerJim Meyering <jim@meyering.net>2003-11-02 20:17:46 +0000
commite5dda0ab935bc1c9b4bfa87db041bdb5de15b438 (patch)
tree140d0e91bc37e3321cdcf49a82a4b89f44e607b8 /src/cp.c
parent4265d0095ef04fde27d001f2819d5604d7e91986 (diff)
downloadcoreutils-e5dda0ab935bc1c9b4bfa87db041bdb5de15b438.tar.xz
(make_path_private): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'.
The former is more maintainable and usually shorter.
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cp.c b/src/cp.c
index 05c4bc227..e92d819dd 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -408,8 +408,7 @@ make_path_private (const char *const_dirpath, int src_offset, int mode,
{
/* Add this directory to the list of directories whose modes need
fixing later. */
- struct dir_attr *new =
- xmalloc (sizeof (struct dir_attr));
+ struct dir_attr *new = xmalloc (sizeof *new);
new->slash_offset = slash - dirpath;
new->next = *attr_list;
*attr_list = new;