diff options
author | jedgar <jedgar@FreeBSD.org> | 2001-12-03 00:51:36 +0000 |
---|---|---|
committer | jedgar <jedgar@FreeBSD.org> | 2001-12-03 00:51:36 +0000 |
commit | 30f5e7ea6e8102cba1c7db2753e8a7c1dbf8137d (patch) | |
tree | 25f1f21319524081b88d9ebfbfe0bc3c53af3ac5 /bin/setfacl/mask.c | |
parent | e0f46659fc7ba2e524035cc4c192580d56ccf416 (diff) | |
download | FreeBSD-src-30f5e7ea6e8102cba1c7db2753e8a7c1dbf8137d.zip FreeBSD-src-30f5e7ea6e8102cba1c7db2753e8a7c1dbf8137d.tar.gz |
style(9) cleanups mostly consisting of:
o explicitly check return values and variables against a value
o return x; -> return (x);
o fix inconsistent sysexits usage by nuking it (partially
suggested by bde)
Obtained from: TrustedBSD Project
Diffstat (limited to 'bin/setfacl/mask.c')
-rw-r--r-- | bin/setfacl/mask.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bin/setfacl/mask.c b/bin/setfacl/mask.c index fd4409a..0851be1 100644 --- a/bin/setfacl/mask.c +++ b/bin/setfacl/mask.c @@ -34,7 +34,6 @@ #include <errno.h> #include <stdio.h> #include <stdlib.h> -#include <sysexits.h> #include "setfacl.h" @@ -55,13 +54,13 @@ set_acl_mask(acl_t *prev_acl) * specified ACL mask entry. */ if (have_mask) - return 0; + return (0); acl = acl_dup(*prev_acl); - if (!acl) - err(EX_OSERR, "acl_dup() failed"); + if (acl == NULL) + err(1, "acl_dup() failed"); - if (!n_flag) { + if (n_flag == 0) { /* * If no mask entry is specified and the -n option is not * specified, then the permissions of the resulting ACL mask @@ -72,7 +71,7 @@ set_acl_mask(acl_t *prev_acl) if (acl_calc_mask(&acl)) { warn("acl_calc_mask() failed"); acl_free(acl); - return -1; + return (-1); } } else { /* @@ -90,7 +89,7 @@ set_acl_mask(acl_t *prev_acl) if (tag == ACL_MASK) { acl_free(acl); - return 0; + return (0); } } @@ -102,11 +101,11 @@ set_acl_mask(acl_t *prev_acl) */ warnx("warning: no mask entry"); acl_free(acl); - return 0; + return (0); } **prev_acl = *acl; acl_free(acl); - return 0; + return (0); } |