From 3f5e632ad1ec0497e42bec0bfa5a1904b693197e Mon Sep 17 00:00:00 2001 From: mikeh Date: Sat, 2 Jun 2001 03:10:07 +0000 Subject: Use S_IXUSR instead of hardcoded values. Reviewed by: md5 --- usr.bin/biff/biff.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr.bin') 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 -- cgit v1.1