From 2a3cf7f364f936c42d03f20e3517e2213372b6bd Mon Sep 17 00:00:00 2001 From: pjd Date: Thu, 21 Mar 2013 22:44:33 +0000 Subject: - Make 'flags' argument to chflags(2), fchflags(2) and lchflags(2) of type u_long. Before this change it was of type int for syscalls, but prototypes in sys/stat.h and documentation for chflags(2) and fchflags(2) (but not for lchflags(2)) stated that it was u_long. Now some related functions use u_long type for flags (strtofflags(3), fflagstostr(3)). - Make path argument of type 'const char *' for consistency. Discussed on: arch Sponsored by: The FreeBSD Foundation --- bin/chflags/chflags.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'bin/chflags/chflags.c') 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') { -- cgit v1.1