]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(do_copy): Constify `dest', and cast-away the new
authorJim Meyering <jim@meyering.net>
Sun, 24 Oct 1999 21:28:37 +0000 (21:28 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 24 Oct 1999 21:28:37 +0000 (21:28 +0000)
const in assignment to new_dest.

src/cp.c

index fca51bad81dbe625b033b49b041486530dc4d4ed..183755d68502ac2671e635cf75662117351ff9ea 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -401,7 +401,7 @@ static int
 do_copy (int n_files, char **file, const char *target_directory,
         const struct cp_options *x)
 {
-  char *dest;
+  const char *dest;
   struct stat sb;
   int new_dst = 0;
   int ret = 0;
@@ -603,7 +603,7 @@ do_copy (int n_files, char **file, const char *target_directory,
        }
       else
        {
-         new_dest = dest;
+         new_dest = (char *) dest;
        }
 
       return copy (source, new_dest, new_dst, x, &unused, NULL);