summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authormikeh <mikeh@FreeBSD.org>2001-06-02 03:10:07 +0000
committermikeh <mikeh@FreeBSD.org>2001-06-02 03:10:07 +0000
commit3f5e632ad1ec0497e42bec0bfa5a1904b693197e (patch)
tree51a7f7300c792d2808b1dec61e84851a11d8422f /usr.bin
parentde2892cc09f812276da58ee91818d29123aef017 (diff)
downloadFreeBSD-src-3f5e632ad1ec0497e42bec0bfa5a1904b693197e.zip
FreeBSD-src-3f5e632ad1ec0497e42bec0bfa5a1904b693197e.tar.gz
Use S_IXUSR instead of hardcoded values.
Reviewed by: md5
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/biff/biff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c
index 718263f5..b592d05 100644
--- a/usr.bin/biff/biff.c
+++ b/usr.bin/biff/biff.c
@@ -80,23 +80,23 @@ main(argc, argv)
err(2, "stat");
if (*argv == NULL) {
- (void)printf("is %s\n", sb.st_mode&0100 ? "y" : "n");
- return(sb.st_mode & 0100 ? 0 : 1);
+ (void)printf("is %s\n", sb.st_mode & S_IXUSR ? "y" : "n");
+ return(sb.st_mode & S_IXUSR ? 0 : 1);
}
switch(argv[0][0]) {
case 'n':
- if (chmod(name, sb.st_mode & ~0100) < 0)
+ if (chmod(name, sb.st_mode & ~S_IXUSR) < 0)
err(2, "%s", name);
break;
case 'y':
- if (chmod(name, sb.st_mode | 0100) < 0)
+ if (chmod(name, sb.st_mode | S_IXUSR) < 0)
err(2, "%s", name);
break;
default:
usage();
}
- return(sb.st_mode & 0100 ? 0 : 1);
+ return(sb.st_mode & S_IXUSR ? 0 : 1);
}
static void
OpenPOWER on IntegriCloud