svn commit: r246266 - stable/9/bin/cp

Eitan Adler eadler at FreeBSD.org
Sat Feb 2 23:11:21 UTC 2013


Author: eadler
Date: Sat Feb  2 23:11:20 2013
New Revision: 246266
URL: http://svnweb.freebsd.org/changeset/base/246266

Log:
  MFC r245535:
  	Remove useless variable 'Pflag':
  		-P is an alternative to -H and -L, and it is implemented using the Hflag and Lflag variables.
  
  Approved by:	cperciva (mentor, implicit)

Modified:
  stable/9/bin/cp/cp.c
Directory Properties:
  stable/9/bin/cp/   (props changed)

Modified: stable/9/bin/cp/cp.c
==============================================================================
--- stable/9/bin/cp/cp.c	Sat Feb  2 23:11:16 2013	(r246265)
+++ stable/9/bin/cp/cp.c	Sat Feb  2 23:11:20 2013	(r246266)
@@ -98,30 +98,28 @@ main(int argc, char *argv[])
 {
 	struct stat to_stat, tmp_stat;
 	enum op type;
-	int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash;
+	int Hflag, Lflag, ch, fts_options, r, have_trailing_slash;
 	char *target;
 
 	fts_options = FTS_NOCHDIR | FTS_PHYSICAL;
-	Hflag = Lflag = Pflag = 0;
+	Hflag = Lflag = 0;
 	while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1)
 		switch (ch) {
 		case 'H':
 			Hflag = 1;
-			Lflag = Pflag = 0;
+			Lflag = 0;
 			break;
 		case 'L':
 			Lflag = 1;
-			Hflag = Pflag = 0;
+			Hflag = 0;
 			break;
 		case 'P':
-			Pflag = 1;
 			Hflag = Lflag = 0;
 			break;
 		case 'R':
 			Rflag = 1;
 			break;
 		case 'a':
-			Pflag = 1;
 			pflag = 1;
 			Rflag = 1;
 			Hflag = Lflag = 0;
@@ -146,7 +144,7 @@ main(int argc, char *argv[])
 			break;
 		case 'r':
 			rflag = Lflag = 1;
-			Hflag = Pflag = 0;
+			Hflag = 0;
 			break;
 		case 'v':
 			vflag = 1;


More information about the svn-src-stable-9 mailing list