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-386f85eadf1974eaac5cdb6335875b61d6484d4f.tar.gz
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)
return -1;
}
- dest_exists = 0;
+ goto dest_removed;
}
- }
-
- if (!dest_exists) {
+ } else {
+dest_removed:
dst_fd = open(dest, O_WRONLY|O_CREAT, source_stat.st_mode);
if (dst_fd == -1) {
bb_perror_msg("unable to open `%s'", dest);