diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-06-07 03:49:41 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-06-07 03:49:41 +0000 |
commit | 14376e1f210a73eb21bf3f8af6c3e250c57900cb (patch) | |
tree | ca7e8f506545d4ad93988d4cdeac61d1ab6ba36e /bin/cp | |
parent | 32a1e9e4a51c8fb2d3b63d72fb9398617157b059 (diff) | |
download | src-test2-14376e1f210a73eb21bf3f8af6c3e250c57900cb.tar.gz src-test2-14376e1f210a73eb21bf3f8af6c3e250c57900cb.zip |
Cleanup some indentation issues.
Notes
Notes:
svn path=/head/; revision=284105
Diffstat (limited to 'bin/cp')
-rw-r--r-- | bin/cp/utils.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index f58ed7a96f9b..f8cf6f4f908e 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -122,18 +122,17 @@ copy_file(const FTSENT *entp, int dne) /* remove existing destination file name, * create a new file */ (void)unlink(to.p_path); - if (!lflag) + if (!lflag) { to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, fs->st_mode & ~(S_ISUID | S_ISGID)); - } else { - if (!lflag) - /* overwrite existing destination file name */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); + } + } else if (!lflag) { + /* overwrite existing destination file name */ + to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } - } else { - if (!lflag) - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); + } else if (!lflag) { + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); } if (to_fd == -1) { |