aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-03-14 21:13:48 +0000
committerRob Landley <rob@landley.net>2006-03-14 21:13:48 +0000
commit386f85eadf1974eaac5cdb6335875b61d6484d4f (patch)
tree12c4b407fe6ab2d1a166813aba2c3d17e6d3c72e
parentd221d2137ffe699d226d23b51fc62b0b9c53b311 (diff)
downloadbusybox-w32-386f85eadf1974eaac5cdb6335875b61d6484d4f.tar.gz
busybox-w32-386f85eadf1974eaac5cdb6335875b61d6484d4f.tar.bz2
busybox-w32-386f85eadf1974eaac5cdb6335875b61d6484d4f.zip
Attempt to make a warning go away without increasing size.
-rw-r--r--libbb/copy_file.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index 0763b4586..35352d27a 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -165,11 +165,10 @@ int copy_file(const char *source, const char *dest, int flags)
165 return -1; 165 return -1;
166 } 166 }
167 167
168 dest_exists = 0; 168 goto dest_removed;
169 } 169 }
170 } 170 } else {
171 171dest_removed:
172 if (!dest_exists) {
173 dst_fd = open(dest, O_WRONLY|O_CREAT, source_stat.st_mode); 172 dst_fd = open(dest, O_WRONLY|O_CREAT, source_stat.st_mode);
174 if (dst_fd == -1) { 173 if (dst_fd == -1) {
175 bb_perror_msg("unable to open `%s'", dest); 174 bb_perror_msg("unable to open `%s'", dest);