svn commit: r284105 - head/bin/cp
Konstantin Belousov
kostikbel at gmail.com
Sun Jun 7 14:06:27 UTC 2015
On Sun, Jun 07, 2015 at 03:49:42AM +0000, Bryan Drewery wrote:
> Author: bdrewery
> Date: Sun Jun 7 03:49:41 2015
> New Revision: 284105
> URL: https://svnweb.freebsd.org/changeset/base/284105
>
> Log:
> Cleanup some indentation issues.
>
> Modified:
> head/bin/cp/utils.c
>
> Modified: head/bin/cp/utils.c
> ==============================================================================
> --- head/bin/cp/utils.c Sat Jun 6 22:03:24 2015 (r284104)
> +++ head/bin/cp/utils.c Sun Jun 7 03:49:41 2015 (r284105)
> @@ -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) {
It seems that the next two lines are indented in a funny way as well.
> 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)
> - 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) {
> + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
> + fs->st_mode & ~(S_ISUID | S_ISGID));
> }
>
> if (to_fd == -1) {
More information about the svn-src-head
mailing list