Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jun 2015 17:06:21 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r284105 - head/bin/cp
Message-ID:  <20150607140621.GI2499@kib.kiev.ua>
In-Reply-To: <201506070349.t573ngeh064017@svn.freebsd.org>
References:  <201506070349.t573ngeh064017@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150607140621.GI2499>