diff options
author | Yuuki Harano <masm+github@masm11.me> | 2021-11-11 00:39:53 +0900 |
---|---|---|
committer | Yuuki Harano <masm+github@masm11.me> | 2021-11-11 00:39:53 +0900 |
commit | 4dd1f56f29fc598a8339a345c2f8945250600602 (patch) | |
tree | af341efedffe027e533b1bcc0dbf270532e48285 /lib/file-has-acl.c | |
parent | 4c49ec7f865bdad1629d2f125f71f4e506b258f2 (diff) | |
parent | 810fa21d26453f898de9747ece7205dfe6de9d08 (diff) | |
download | emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.gz emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.bz2 emacs-4dd1f56f29fc598a8339a345c2f8945250600602.zip |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'lib/file-has-acl.c')
-rw-r--r-- | lib/file-has-acl.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c index c667ae9d24a..800af227ccc 100644 --- a/lib/file-has-acl.c +++ b/lib/file-has-acl.c @@ -1,6 +1,6 @@ /* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*- - Copyright (C) 2002-2003, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -206,9 +206,7 @@ file_has_acl (char const *name, struct stat const *sb) ; else { - int saved_errno = errno; free (malloced); - errno = saved_errno; return -1; } } @@ -281,9 +279,7 @@ file_has_acl (char const *name, struct stat const *sb) ; else { - int saved_errno = errno; free (malloced); - errno = saved_errno; return -1; } } @@ -353,7 +349,7 @@ file_has_acl (char const *name, struct stat const *sb) { struct stat statbuf; - if (stat (name, &statbuf) < 0) + if (stat (name, &statbuf) == -1 && errno != EOVERFLOW) return -1; return acl_nontrivial (count, entries); @@ -418,11 +414,7 @@ file_has_acl (char const *name, struct stat const *sb) if (errno != ENOSPC) { if (acl != aclbuf) - { - int saved_errno = errno; - free (acl); - errno = saved_errno; - } + free (acl); return -1; } aclsize = 2 * aclsize; |