mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(fdopendir): Don't change errno when returning non-NULL.
This commit is contained in:
1 parent
1000eb18b6
commit
e8609798de
1 file changed
+1
-1
+1
-1
@@ -232,7 +232,7 @@ fdopendir (int fd)
|
||||
char *proc_file;
|
||||
BUILD_PROC_NAME (proc_file, fd, ".");
|
||||
dir = opendir (proc_file);
|
||||
saved_errno = errno;
|
||||
saved_errno = (dir == NULL ? errno : 0);
|
||||
/* If the syscall succeeded, or if it failed with an unexpected
|
||||
errno value, then return right away. Otherwise, fall through
|
||||
and resort to using save_cwd/restore_cwd. */
|
||||
|
||||
Reference in new issue
Block a user