summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-11-22 10:55:40 +0000
committerJim Meyering <jim@meyering.net>2001-11-22 10:55:40 +0000
commitc5ad355677b6297dfbd4f8a1b4760b3a5a2ccdb6 (patch)
tree2791372d75112075958ec12996c8bed073e95726 /src/cp.c
parent42ad428793e4d2e8c43ef389cfcfd06aa17949d9 (diff)
downloadcoreutils-c5ad355677b6297dfbd4f8a1b4760b3a5a2ccdb6.tar.xz
(cp_option_init): Initialize new member.
(do_copy): Remove const attribute from declaration of parameter, x. dest_info_init now takes a parameter.
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cp.c b/src/cp.c
index 0be19fba6..a99de4ac1 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -462,7 +462,7 @@ make_path_private (const char *const_dirpath, int src_offset, int mode,
static int
do_copy (int n_files, char **file, const char *target_directory,
- const struct cp_options *x)
+ struct cp_options *x)
{
const char *dest;
struct stat sb;
@@ -493,7 +493,7 @@ do_copy (int n_files, char **file, const char *target_directory,
The problem it is used to detect can arise only if there are
two or more files to copy. */
if (n_files >= 2)
- dest_info_init ();
+ dest_info_init (x);
if (lstat (dest, &sb))
{
@@ -726,6 +726,7 @@ cp_option_init (struct cp_options *x)
x->update = 0;
x->verbose = 0;
+ x->dest_info = NULL;
}
/* Given a string, ARG, containing a comma-separated list of arguments