summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-09-28 08:23:28 +0000
committerJim Meyering <jim@meyering.net>2003-09-28 08:23:28 +0000
commit3d56cf5c1db2ca76101b63f0f70c0562eb0a0efd (patch)
tree130c6937502b0805afc88d1e0962948433481fe8 /src/cp.c
parentb19d106cdbe19272770d61fb65bd7d0099287d75 (diff)
downloadcoreutils-3d56cf5c1db2ca76101b63f0f70c0562eb0a0efd.tar.xz
Remove unnecessary casts of alloca, since now it's guaranteed to be (void *).
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cp.c b/src/cp.c
index 9e5e3d795..a3f89e309 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -285,7 +285,7 @@ re_protect (const char *const_dst_path, int src_offset,
char *src_path; /* The source name in `dst_path'. */
uid_t myeuid = geteuid ();
- dst_path = (char *) alloca (strlen (const_dst_path) + 1);
+ dst_path = alloca (strlen (const_dst_path) + 1);
strcpy (dst_path, const_dst_path);
src_path = dst_path + src_offset;
@@ -383,13 +383,13 @@ make_path_private (const char *const_dirpath, int src_offset, int mode,
char *dst_dirname; /* Leading path of `dirpath'. */
size_t dirlen; /* Length of leading path of `dirpath'. */
- dirpath = (char *) alloca (strlen (const_dirpath) + 1);
+ dirpath = alloca (strlen (const_dirpath) + 1);
strcpy (dirpath, const_dirpath);
src = dirpath + src_offset;
dirlen = dir_len (dirpath);
- dst_dirname = (char *) alloca (dirlen + 1);
+ dst_dirname = alloca (dirlen + 1);
memcpy (dst_dirname, dirpath, dirlen);
dst_dirname[dirlen] = '\0';
@@ -691,8 +691,7 @@ do_copy (int n_files, char **file, const char *target_directory,
char *source_base;
ASSIGN_BASENAME_STRDUPA (source_base, source);
- new_dest = (char *) alloca (strlen (dest)
- + strlen (source_base) + 1);
+ new_dest = alloca (strlen (dest) + strlen (source_base) + 1);
stpcpy (stpcpy (new_dest, dest), source_base);
}
else