summaryrefslogtreecommitdiffstats
path: root/lib/libc/posix1e/acl_get.c
diff options
context:
space:
mode:
authorjedgar <jedgar@FreeBSD.org>2002-02-21 23:17:19 +0000
committerjedgar <jedgar@FreeBSD.org>2002-02-21 23:17:19 +0000
commitd958ae799ceb2a35694212712ea44eb5ee94e847 (patch)
tree7e543f2025311de625138ca8efe7353755a977af /lib/libc/posix1e/acl_get.c
parent6452c2e85d04e3efcaffbbd49b4c693d65e8c0ef (diff)
downloadFreeBSD-src-d958ae799ceb2a35694212712ea44eb5ee94e847.zip
FreeBSD-src-d958ae799ceb2a35694212712ea44eb5ee94e847.tar.gz
o style(9) and consistency fixes:
- if (!var) -> if (var == NULL) - return val; -> return (val); Reviewed by: rwatson Obtained from: TrustedBSD Project
Diffstat (limited to 'lib/libc/posix1e/acl_get.c')
-rw-r--r--lib/libc/posix1e/acl_get.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/lib/libc/posix1e/acl_get.c b/lib/libc/posix1e/acl_get.c
index 4f84cef..94bb0a2 100644
--- a/lib/libc/posix1e/acl_get.c
+++ b/lib/libc/posix1e/acl_get.c
@@ -52,9 +52,8 @@ acl_get_file(const char *path_p, acl_type_t type)
int error;
aclp = acl_init(ACL_MAX_ENTRIES);
- if (!aclp) {
+ if (aclp == NULL)
return (NULL);
- }
error = __acl_get_file(path_p, type, &aclp->ats_acl);
if (error) {
@@ -72,9 +71,8 @@ acl_get_fd(int fd)
int error;
aclp = acl_init(ACL_MAX_ENTRIES);
- if (!aclp) {
+ if (aclp == NULL)
return (NULL);
- }
error = ___acl_get_fd(fd, ACL_TYPE_ACCESS, &aclp->ats_acl);
if (error) {
@@ -92,9 +90,8 @@ acl_get_fd_np(int fd, acl_type_t type)
int error;
aclp = acl_init(ACL_MAX_ENTRIES);
- if (!aclp) {
+ if (aclp == NULL)
return (NULL);
- }
error = ___acl_get_fd(fd, type, &aclp->ats_acl);
if (error) {
@@ -109,9 +106,9 @@ int
acl_get_perm_np(acl_permset_t permset_d, acl_perm_t perm)
{
- if (!permset_d) {
+ if (permset_d == NULL) {
errno = EINVAL;
- return -1;
+ return (-1);
}
switch(perm) {
@@ -119,14 +116,14 @@ acl_get_perm_np(acl_permset_t permset_d, acl_perm_t perm)
case ACL_WRITE:
case ACL_EXECUTE:
if (*permset_d & perm)
- return 1;
+ return (1);
break;
default:
errno = EINVAL;
- return -1;
+ return (-1);
}
- return 0;
+ return (0);
}
/*
@@ -137,14 +134,14 @@ int
acl_get_permset(acl_entry_t entry_d, acl_permset_t *permset_p)
{
- if (!entry_d || !permset_p) {
+ if (entry_d == NULL || permset_p == NULL) {
errno = EINVAL;
- return -1;
+ return (-1);
}
*permset_p = &entry_d->ae_perm;
- return 0;
+ return (0);
}
/*
@@ -156,23 +153,23 @@ acl_get_qualifier(acl_entry_t entry_d)
{
uid_t *retval;
- if (!entry_d) {
+ if (entry_d == NULL) {
errno = EINVAL;
- return NULL;
+ return (NULL);
}
switch(entry_d->ae_tag) {
case ACL_USER:
case ACL_GROUP:
retval = malloc(sizeof(uid_t));
- if (!retval)
- return NULL;
+ if (retval == NULL)
+ return (NULL);
*retval = entry_d->ae_id;
- return retval;
+ return (retval);
}
errno = EINVAL;
- return NULL;
+ return (NULL);
}
/*
@@ -183,12 +180,12 @@ int
acl_get_tag_type(acl_entry_t entry_d, acl_tag_t *tag_type_p)
{
- if (!entry_d || !tag_type_p) {
+ if (entry_d == NULL || tag_type_p == NULL) {
errno = EINVAL;
- return -1;
+ return (-1);
}
*tag_type_p = entry_d->ae_tag;
- return 0;
+ return (0);
}
OpenPOWER on IntegriCloud