From 74e44aee33e9289ce2c2c5f99876fddbcd1d1be6 Mon Sep 17 00:00:00 2001 From: landley Date: Tue, 14 Mar 2006 21:13:48 +0000 Subject: Attempt to make a warning go away without increasing size. git-svn-id: svn://busybox.net/trunk/busybox@14540 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- libbb/copy_file.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libbb') 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); -- cgit v1.2.3-55-g6feb