diff options
author | Jim Meyering <jim@meyering.net> | 2003-11-02 20:17:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-11-02 20:17:46 +0000 |
commit | e5dda0ab935bc1c9b4bfa87db041bdb5de15b438 (patch) | |
tree | 140d0e91bc37e3321cdcf49a82a4b89f44e607b8 | |
parent | 4265d0095ef04fde27d001f2819d5604d7e91986 (diff) | |
download | coreutils-e5dda0ab935bc1c9b4bfa87db041bdb5de15b438.tar.xz |
(make_path_private): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'.
The former is more maintainable and usually shorter.
-rw-r--r-- | src/cp.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |