[git commit] libbb: do not check closedir() in remove_file()
Denys Vlasenko
vda.linux at googlemail.com
Thu Jun 24 15:39:57 UTC 2021
commit: https://git.busybox.net/busybox/commit/?id=4a68697521392f461c8627841531548d4bd6841a
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
If it's needed, there has to be a comment why. There isn't.
function old new delta
.rodata 103686 103669 -17
remove_file 598 571 -27
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-44) Total: -44 bytes
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
libbb/remove_file.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libbb/remove_file.c b/libbb/remove_file.c
index cea5d47e6..1505e6218 100644
--- a/libbb/remove_file.c
+++ b/libbb/remove_file.c
@@ -60,11 +60,7 @@ int FAST_FUNC remove_file(const char *path, int flags)
status = -1;
free(new_path);
}
-
- if (closedir(dp) < 0) {
- bb_perror_msg("can't close '%s'", path);
- return -1;
- }
+ closedir(dp);
if (flags & FILEUTILS_INTERACTIVE) {
fprintf(stderr, "%s: remove directory '%s'? ",
More information about the busybox-cvs
mailing list