diff options
author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-14 21:13:48 +0000 |
---|---|---|
committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-14 21:13:48 +0000 |
commit | 74e44aee33e9289ce2c2c5f99876fddbcd1d1be6 (patch) | |
tree | 12c4b407fe6ab2d1a166813aba2c3d17e6d3c72e /libbb | |
parent | 6a2a71a66c43322bedbff68c0e60a6efe625ea67 (diff) | |
download | busybox-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.c | 7 |
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 | 171 | dest_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); |