diff options
author | eadler <eadler@FreeBSD.org> | 2013-01-17 04:20:31 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2013-01-17 04:20:31 +0000 |
commit | cbaafd77280b187066175b026b3073cf3c58375a (patch) | |
tree | 66daf9f2a5fe9793e1683bd991cf55a8d0fcfebe | |
parent | 28491a8c651aa8aa23c766de5199de58b1e0cfda (diff) | |
download | FreeBSD-src-cbaafd77280b187066175b026b3073cf3c58375a.zip FreeBSD-src-cbaafd77280b187066175b026b3073cf3c58375a.tar.gz |
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
-rw-r--r-- | bin/cp/cp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 86dbb3c..b83eead 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -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; |