svn commit: r284105 - head/bin/cp

Bryan Drewery bdrewery at FreeBSD.org
Sun Jun 7 03:49:42 UTC 2015


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) {
 		    	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-all mailing list