Mercurial > hg > octave-nkf > gnulib-hg
changeset 10168:d688b8e59f31
Trivial stylistic improvements.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 07 Jun 2008 20:11:23 +0200 |
parents | 7239ee79f3fa |
children | 7215efd0ff4f |
files | ChangeLog lib/copy-acl.c lib/set-mode-acl.c |
diffstat | 3 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-07 Bruno Haible <bruno@clisp.org> + + * lib/copy-acl.c (qcopy_acl): Make the #if branches independent. + * lib/set-mode-acl.c (qset_acl): Choose better local variable names. + 2008-06-07 Bruno Haible <bruno@clisp.org> * doc/posix-functions/_setjmp.texi: Explain the use of this function
--- a/lib/copy-acl.c +++ b/lib/copy-acl.c @@ -39,13 +39,13 @@ qcopy_acl (const char *src_name, int source_desc, const char *dst_name, int dest_desc, mode_t mode) { - int ret; - #if USE_ACL && HAVE_ACL_GET_FILE /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */ /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */ acl_t acl; + int ret; + if (HAVE_ACL_GET_FD && source_desc != -1) acl = acl_get_fd (source_desc); else @@ -124,6 +124,7 @@ #elif USE_ACL && defined ACL_NO_TRIVIAL /* Solaris 10 NFSv4 ACLs. */ + int ret; acl_t *aclp = NULL; ret = (source_desc < 0 ? acl_get (src_name, ACL_NO_TRIVIAL, &aclp) @@ -155,8 +156,7 @@ #else - ret = qset_acl (dst_name, dest_desc, mode); - return ret; + return qset_acl (dst_name, dest_desc, mode); #endif }
--- a/lib/set-mode-acl.c +++ b/lib/set-mode-acl.c @@ -209,13 +209,13 @@ } else { - int acl_result = (desc < 0 ? acl_set (name, aclp) : facl_set (desc, aclp)); - int acl_errno = errno; + int ret = (desc < 0 ? acl_set (name, aclp) : facl_set (desc, aclp)); + int saved_errno = errno; acl_free (aclp); - if (acl_result == 0 || acl_errno != ENOSYS) + if (ret == 0 || saved_errno != ENOSYS) { - errno = acl_errno; - return acl_result; + errno = saved_errno; + return ret; } }