diff options
-rw-r--r-- | lib/libc/posix1e/acl_calc_mask.c | 18 | ||||
-rw-r--r-- | lib/libc/posix1e/acl_copy.c | 12 | ||||
-rw-r--r-- | lib/libc/posix1e/acl_delete_entry.c | 12 | ||||
-rw-r--r-- | lib/libc/posix1e/acl_entry.c | 18 | ||||
-rw-r--r-- | lib/libc/posix1e/acl_perm.c | 16 | ||||
-rw-r--r-- | lib/libc/posix1e/acl_size.c | 4 |
6 files changed, 40 insertions, 40 deletions
diff --git a/lib/libc/posix1e/acl_calc_mask.c b/lib/libc/posix1e/acl_calc_mask.c index 90fe224..3a425cc 100644 --- a/lib/libc/posix1e/acl_calc_mask.c +++ b/lib/libc/posix1e/acl_calc_mask.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001 Chris D. Faulhaber + * Copyright (c) 2001-2002 Chris D. Faulhaber * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,19 +54,19 @@ acl_calc_mask(acl_t *acl_p) * perform sanity checks here and validate the ACL prior to * returning. */ - if (!acl_p || !*acl_p) { + if (acl_p == NULL || *acl_p == NULL) { errno = EINVAL; - return -1; + return (-1); } acl_int = &(*acl_p)->ats_acl; if ((acl_int->acl_cnt < 3) || (acl_int->acl_cnt > ACL_MAX_ENTRIES)) { errno = EINVAL; - return -1; + return (-1); } acl_new = acl_dup(*acl_p); - if (!acl_new) - return -1; + if (acl_new == NULL) + return (-1); acl_int_new = &acl_new->ats_acl; mask_mode = 0; @@ -94,7 +94,7 @@ acl_calc_mask(acl_t *acl_p) /* if no mask exists, check acl_cnt... */ if (acl_int_new->acl_cnt == ACL_MAX_ENTRIES) { errno = ENOMEM; - return -1; + return (-1); } /* ...and add the mask entry */ acl_int_new->acl_entry[acl_int_new->acl_cnt].ae_tag = ACL_MASK; @@ -108,11 +108,11 @@ acl_calc_mask(acl_t *acl_p) if (acl_valid(acl_new) == -1) { errno = EINVAL; acl_free(acl_new); - return -1; + return (-1); } **acl_p = *acl_new; acl_free(acl_new); - return 0; + return (0); } diff --git a/lib/libc/posix1e/acl_copy.c b/lib/libc/posix1e/acl_copy.c index 800648a..15b9d9c 100644 --- a/lib/libc/posix1e/acl_copy.c +++ b/lib/libc/posix1e/acl_copy.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001 Chris D. Faulhaber + * Copyright (c) 2001-2002 Chris D. Faulhaber * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,16 +42,16 @@ int acl_copy_entry(acl_entry_t dest_d, acl_entry_t src_d) { - if (!src_d || !dest_d || (src_d == dest_d)) { + if (src_d == NULL || dest_d == NULL || src_d == dest_d) { errno = EINVAL; - return -1; + return (-1); } dest_d->ae_tag = src_d->ae_tag; dest_d->ae_id = src_d->ae_id; dest_d->ae_perm = src_d->ae_perm; - return 0; + return (0); } ssize_t @@ -59,7 +59,7 @@ acl_copy_ext(void *buf_p, acl_t acl, ssize_t size) { errno = ENOSYS; - return -1; + return (-1); } acl_t @@ -67,5 +67,5 @@ acl_copy_int(const void *buf_p) { errno = ENOSYS; - return NULL; + return (NULL); } diff --git a/lib/libc/posix1e/acl_delete_entry.c b/lib/libc/posix1e/acl_delete_entry.c index 760078f..7169c6f 100644 --- a/lib/libc/posix1e/acl_delete_entry.c +++ b/lib/libc/posix1e/acl_delete_entry.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001 Chris D. Faulhaber + * Copyright (c) 2001-2002 Chris D. Faulhaber * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,9 +43,9 @@ acl_delete_entry(acl_t acl, acl_entry_t entry_d) struct acl *acl_int; int i; - if (!acl || !entry_d) { + if (acl == NULL || entry_d == NULL) { errno = EINVAL; - return -1; + return (-1); } acl_int = &acl->ats_acl; @@ -53,7 +53,7 @@ acl_delete_entry(acl_t acl, acl_entry_t entry_d) if ((acl->ats_acl.acl_cnt < 1) || (acl->ats_acl.acl_cnt > ACL_MAX_ENTRIES)) { errno = EINVAL; - return -1; + return (-1); } for (i = 0; i < acl->ats_acl.acl_cnt; i++) { /* if this is our entry... */ @@ -68,11 +68,11 @@ acl_delete_entry(acl_t acl, acl_entry_t entry_d) bzero(&acl->ats_acl.acl_entry[i], sizeof(struct acl_entry)); acl->ats_cur_entry = 0; - return 0; + return (0); } } errno = EINVAL; - return -1; + return (-1); } diff --git a/lib/libc/posix1e/acl_entry.c b/lib/libc/posix1e/acl_entry.c index 337340d..3962da6 100644 --- a/lib/libc/posix1e/acl_entry.c +++ b/lib/libc/posix1e/acl_entry.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001 Chris D. Faulhaber + * Copyright (c) 2001-2002 Chris D. Faulhaber * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,16 +43,16 @@ acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p) { struct acl *acl_int; - if (!acl_p) { + if (acl_p == NULL) { errno = EINVAL; - return -1; + return (-1); } acl_int = &(*acl_p)->ats_acl; if ((acl_int->acl_cnt >= ACL_MAX_ENTRIES) || (acl_int->acl_cnt < 0)) { errno = EINVAL; - return -1; + return (-1); } *entry_p = &acl_int->acl_entry[acl_int->acl_cnt++]; @@ -63,7 +63,7 @@ acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p) (*acl_p)->ats_cur_entry = 0; - return 0; + return (0); } /* @@ -75,9 +75,9 @@ acl_get_entry(acl_t acl, int entry_id, acl_entry_t *entry_p) { struct acl *acl_int; - if (!acl) { + if (acl == NULL) { errno = EINVAL; - return -1; + return (-1); } acl_int = &acl->ats_acl; @@ -89,9 +89,9 @@ acl_get_entry(acl_t acl, int entry_id, acl_entry_t *entry_p) if (acl->ats_cur_entry >= acl->ats_acl.acl_cnt) return 0; *entry_p = &acl_int->acl_entry[acl->ats_cur_entry++]; - return 1; + return (1); } errno = EINVAL; - return -1; + return (-1); } diff --git a/lib/libc/posix1e/acl_perm.c b/lib/libc/posix1e/acl_perm.c index 8f634cb..21a8a77 100644 --- a/lib/libc/posix1e/acl_perm.c +++ b/lib/libc/posix1e/acl_perm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001 Chris D. Faulhaber + * Copyright (c) 2001-2002 Chris D. Faulhaber * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,12 +48,12 @@ acl_add_perm(acl_permset_t permset_d, acl_perm_t perm) case ACL_WRITE: case ACL_EXECUTE: *permset_d |= perm; - return 0; + return (0); } } errno = EINVAL; - return -1; + return (-1); } /* @@ -64,14 +64,14 @@ int acl_clear_perms(acl_permset_t permset_d) { - if (!permset_d) { + if (permset_d == NULL) { errno = EINVAL; - return -1; + return (-1); } *permset_d = ACL_PERM_NONE; - return 0; + return (0); } /* @@ -88,10 +88,10 @@ acl_delete_perm(acl_permset_t permset_d, acl_perm_t perm) case ACL_WRITE: case ACL_EXECUTE: *permset_d &= ~(perm & ACL_PERM_BITS); - return 0; + return (0); } } errno = EINVAL; - return -1; + return (-1); } diff --git a/lib/libc/posix1e/acl_size.c b/lib/libc/posix1e/acl_size.c index 78ffff1..0d972ef 100644 --- a/lib/libc/posix1e/acl_size.c +++ b/lib/libc/posix1e/acl_size.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001 Chris D. Faulhaber + * Copyright (c) 2001-2002 Chris D. Faulhaber * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,5 +38,5 @@ acl_size(acl_t acl) { errno = ENOSYS; - return -1; + return (-1); } |