diff options
| author | Chris D. Faulhaber <jedgar@FreeBSD.org> | 2001-04-11 22:09:51 +0000 |
|---|---|---|
| committer | Chris D. Faulhaber <jedgar@FreeBSD.org> | 2001-04-11 22:09:51 +0000 |
| commit | bbf2cf59fc3e9dc10a94d8004a1e2a7e858edcf2 (patch) | |
| tree | 892433e48eeadf6ae7b9dd1c5d6846da11d17659 /lib/libc | |
| parent | 422c727634fa86f9915a1f7c2b2b500673c94110 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/posix1e/acl_entry.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/libc/posix1e/acl_entry.c b/lib/libc/posix1e/acl_entry.c index 47d66f698dfd..49dfb841443c 100644 --- a/lib/libc/posix1e/acl_entry.c +++ b/lib/libc/posix1e/acl_entry.c @@ -41,7 +41,6 @@ int acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p) { acl_t acl; - struct acl_entry newentry; if (!acl_p || !*acl_p || ((*acl_p)->acl_cnt >= ACL_MAX_ENTRIES) || ((*acl_p)->acl_cnt < 0)) { @@ -49,30 +48,14 @@ acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p) return -1; } - entry_p = malloc(sizeof(acl_entry_t)); - if (!entry_p) - return -1; - *entry_p = malloc(sizeof(struct acl_entry)); - if (!*entry_p) - return -1; - acl = *acl_p; - **entry_p = acl->acl_entry[acl->acl_cnt]; + *entry_p = &acl->acl_entry[acl->acl_cnt++]; (**entry_p).ae_tag = ACL_UNDEFINED_TAG; (**entry_p).ae_id = ACL_UNDEFINED_ID; (**entry_p).ae_perm = ACL_PERM_NONE; - acl->acl_entry[acl->acl_cnt] = newentry; - acl->acl_cnt++; - - **entry_p = newentry; - - /* XXX - ok? */ - free(*entry_p); - free(entry_p); - return 0; } |
