aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-03-14 21:13:48 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-03-14 21:13:48 +0000
commit74e44aee33e9289ce2c2c5f99876fddbcd1d1be6 (patch)
tree12c4b407fe6ab2d1a166813aba2c3d17e6d3c72e /libbb
parent6a2a71a66c43322bedbff68c0e60a6efe625ea67 (diff)
downloadbusybox-w32-74e44aee33e9289ce2c2c5f99876fddbcd1d1be6.tar.gz
busybox-w32-74e44aee33e9289ce2c2c5f99876fddbcd1d1be6.tar.bz2
busybox-w32-74e44aee33e9289ce2c2c5f99876fddbcd1d1be6.zip
Attempt to make a warning go away without increasing size.
git-svn-id: svn://busybox.net/trunk/busybox@14540 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-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);