summaryrefslogtreecommitdiffstats
path: root/usr.sbin/chown/chown.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/chown/chown.c')
-rw-r--r--usr.sbin/chown/chown.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c
index a5ff99e..f034857 100644
--- a/usr.sbin/chown/chown.c
+++ b/usr.sbin/chown/chown.c
@@ -155,11 +155,10 @@ main(argc, argv)
for (rval = 0; (p = fts_read(ftsp)) != NULL;) {
switch (p->fts_info) {
- case FTS_D:
- if (Rflag) /* Change it at FTS_DP. */
- continue;
- fts_set(ftsp, p, FTS_SKIP);
- break;
+ case FTS_D: /* Change it at FTS_DP. */
+ if (!Rflag)
+ fts_set(ftsp, p, FTS_SKIP);
+ continue;
case FTS_DNR: /* Warn, chown, continue. */
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
rval = 1;
OpenPOWER on IntegriCloud