summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/chflags/chflags.c6
-rw-r--r--bin/mv/mv.c2
2 files changed, 2 insertions, 6 deletions
diff --git a/bin/chflags/chflags.c b/bin/chflags/chflags.c
index 2c07db9..e94c34d 100644
--- a/bin/chflags/chflags.c
+++ b/bin/chflags/chflags.c
@@ -117,11 +117,7 @@ main(int argc, char *argv[])
} else
fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL;
- /* XXX: Why don't chflags and lchflags have compatible prototypes? */
- if (hflag)
- change_flags = (int (*)(const char *, unsigned long))lchflags;
- else
- change_flags = chflags;
+ change_flags = hflag ? lchflags : chflags;
flags = *argv;
if (*flags >= '0' && *flags <= '7') {
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index 5147a2db..2710f89 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -337,7 +337,7 @@ err: if (unlink(to))
* on a file that we copied, i.e., that we didn't create.)
*/
errno = 0;
- if (fchflags(to_fd, (u_long)sbp->st_flags))
+ if (fchflags(to_fd, sbp->st_flags))
if (errno != EOPNOTSUPP || sbp->st_flags != 0)
warn("%s: set flags (was: 0%07o)", to, sbp->st_flags);
OpenPOWER on IntegriCloud