summaryrefslogtreecommitdiffstats
path: root/bin/cp
diff options
context:
space:
mode:
authortrhodes <trhodes@FreeBSD.org>2006-10-11 10:26:34 +0000
committertrhodes <trhodes@FreeBSD.org>2006-10-11 10:26:34 +0000
commitca75959a968f5c17e17f1a69aa4388b442c5ec96 (patch)
treee969d63ea1fc1376aefe575c4dc177067db1563c /bin/cp
parent38c5b1044f907414b4936528fdc246e5ceffc12e (diff)
downloadFreeBSD-src-ca75959a968f5c17e17f1a69aa4388b442c5ec96.zip
FreeBSD-src-ca75959a968f5c17e17f1a69aa4388b442c5ec96.tar.gz
Fix style(9) bugs in previous commit.
Lesson from: bde
Diffstat (limited to 'bin/cp')
-rw-r--r--bin/cp/cp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index 13757f0..fcc2b76 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -155,12 +155,9 @@ main(int argc, char *argv[])
usage();
fts_options = FTS_NOCHDIR | FTS_PHYSICAL;
- if (rflag) {
- if (Rflag)
- errx(1,
- "the -R and -r options may not be specified together.");
- }
- if (rflag && !Hflag && !Pflag)
+ if (Rflag && rflag)
+ errx(1, "the -R and -r options may not be specified together");
+ if (rflag)
Rflag = 1;
if (Rflag) {
if (Hflag)
@@ -230,7 +227,7 @@ main(int argc, char *argv[])
else
lstat(*argv, &tmp_stat);
- if (S_ISDIR(tmp_stat.st_mode) && (Rflag))
+ if (S_ISDIR(tmp_stat.st_mode) && Rflag)
type = DIR_TO_DNE;
else
type = FILE_TO_FILE;
OpenPOWER on IntegriCloud