From: Jim Meyering Date: Sun, 2 Nov 2003 20:17:46 +0000 (+0000) Subject: (make_path_private): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'. X-Git-Tag: v5.1.0~271 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5dda0ab935bc1c9b4bfa87db041bdb5de15b438;p=thirdparty%2Fcoreutils.git (make_path_private): Use `sizeof *var' rather than `sizeof EXPLICIT_TYPE'. The former is more maintainable and usually shorter. --- diff --git a/src/cp.c b/src/cp.c index 05c4bc2278..e92d819dd9 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;