summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-07-04 17:47:09 +0000
committerJim Meyering <jim@meyering.net>2004-07-04 17:47:09 +0000
commitae206c4b1c6ca22345e20da3aa52b1aefec988bc (patch)
tree76aedf716692ec6af1e18a74fc78c84fcc3c2529
parentaead5906dccb1740ed3fa2b89e09448542c89005 (diff)
downloadcoreutils-ae206c4b1c6ca22345e20da3aa52b1aefec988bc.tar.xz
(do_copy): Assume path_concat returns non-NULL.
(make_path_private): 2nd arg is now size_t, not int, to avoid problem when path_concat dir name is longer than 2 GiB (!).
-rw-r--r--src/cp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cp.c b/src/cp.c
index b2a85c2f0..9563b149f 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -371,7 +371,7 @@ re_protect (const char *const_dst_path, int src_offset,
/* FIXME: find a way to synch this function with the one in lib/makepath.c. */
static int
-make_path_private (const char *const_dirpath, int src_offset, int mode,
+make_path_private (const char *const_dirpath, size_t src_offset, int mode,
const char *verbose_fmt_string, struct dir_attr **attr_list,
int *new_dst, int (*xstat)())
{
@@ -582,8 +582,6 @@ do_copy (int n_files, char **file, const char *target_directory,
/* Append all of `arg' (minus any trailing slash) to `dest'. */
dst_path = path_concat (target_directory, arg_no_trailing_slash,
&arg_in_concat);
- if (dst_path == NULL)
- xalloc_die ();
/* For --parents, we have to make sure that the directory
dir_name (dst_path) exists. We may have to create a few