diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 2 | ||||
-rw-r--r-- | src/pwd.c | 2 | ||||
-rw-r--r-- | src/remove.c | 8 | ||||
-rw-r--r-- | src/system.h | 7 |
4 files changed, 6 insertions, 13 deletions
@@ -2377,7 +2377,7 @@ print_dir (char const *name, char const *realname, bool command_line_arg) break; } - if (CLOSEDIR (dirp) != 0) + if (closedir (dirp) != 0) { file_failure (command_line_arg, _("closing directory %s"), name); /* Don't return; print whatever we got. */ @@ -216,7 +216,7 @@ find_dir_entry (struct stat *dot_sb, struct file_name *file_name, } } - if (dirp == NULL || CLOSEDIR (dirp) != 0) + if (dirp == NULL || closedir (dirp) != 0) { /* Note that this diagnostic serves for both readdir and closedir failures. */ diff --git a/src/remove.c b/src/remove.c index 4ee59cec3..a219955bc 100644 --- a/src/remove.c +++ b/src/remove.c @@ -423,7 +423,7 @@ AD_pop_and_chdir (DIR **dirp, Dirstack_state *ds, char **prev_dir) { struct stat sb; int fd = openat (dirfd (*dirp), "..", O_RDONLY); - if (CLOSEDIR (*dirp) != 0) + if (closedir (*dirp) != 0) { error (0, errno, _("FATAL: failed to close directory %s"), quote (full_filename (*prev_dir))); @@ -474,7 +474,7 @@ AD_pop_and_chdir (DIR **dirp, Dirstack_state *ds, char **prev_dir) } else { - if (CLOSEDIR (*dirp) != 0) + if (closedir (*dirp) != 0) { error (0, errno, _("FATAL: failed to close directory %s"), quote (full_filename (*prev_dir))); @@ -1162,7 +1162,7 @@ The following directory is part of the cycle:\n %s\n"), } *subdir = xstrdup (f); - if (CLOSEDIR (*dirp) != 0) + if (closedir (*dirp) != 0) { error (0, 0, _("failed to close directory %s"), quote (full_filename ("."))); @@ -1337,7 +1337,7 @@ remove_dir (int fd_cwd, Dirstack_state *ds, char const *dir, AD_stack_pop (ds); closedir_and_return:; - if (dirp != NULL && CLOSEDIR (dirp) != 0) + if (dirp != NULL && closedir (dirp) != 0) { error (0, 0, _("failed to close directory %s"), quote (full_filename ("."))); diff --git a/src/system.h b/src/system.h index ab4826682..7ddbd7dbe 100644 --- a/src/system.h +++ b/src/system.h @@ -241,13 +241,6 @@ initialize_exit_failure (int status) # endif /* HAVE_NDIR_H */ #endif /* HAVE_DIRENT_H */ -#if CLOSEDIR_VOID -/* Fake a return value. */ -# define CLOSEDIR(d) (closedir (d), 0) -#else -# define CLOSEDIR(d) closedir (d) -#endif - enum { NOT_AN_INODE_NUMBER = 0 |