Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jan 2013 04:20:31 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r245535 - head/bin/cp
Message-ID:  <201301170420.r0H4KVOb092613@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Thu Jan 17 04:20:31 2013
New Revision: 245535
URL: http://svnweb.freebsd.org/changeset/base/245535

Log:
  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
  MFC after:	3 days

Modified:
  head/bin/cp/cp.c

Modified: head/bin/cp/cp.c
==============================================================================
--- head/bin/cp/cp.c	Thu Jan 17 03:27:53 2013	(r245534)
+++ head/bin/cp/cp.c	Thu Jan 17 04:20:31 2013	(r245535)
@@ -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;



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