aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-06-24 17:39:57 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-06-24 17:39:57 +0200
commit4a68697521392f461c8627841531548d4bd6841a (patch)
tree5dbdd042a179fbd5a87e52c959db174c3f28fc8c
parent6481070eb949125b750aae6e0ec08368a15ac371 (diff)
downloadbusybox-w32-4a68697521392f461c8627841531548d4bd6841a.tar.gz
busybox-w32-4a68697521392f461c8627841531548d4bd6841a.tar.bz2
busybox-w32-4a68697521392f461c8627841531548d4bd6841a.zip
libbb: do not check closedir() in remove_file()
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@googlemail.com>
-rw-r--r--libbb/remove_file.c6
1 files changed, 1 insertions, 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)
60 status = -1; 60 status = -1;
61 free(new_path); 61 free(new_path);
62 } 62 }
63 63 closedir(dp);
64 if (closedir(dp) < 0) {
65 bb_perror_msg("can't close '%s'", path);
66 return -1;
67 }
68 64
69 if (flags & FILEUTILS_INTERACTIVE) { 65 if (flags & FILEUTILS_INTERACTIVE) {
70 fprintf(stderr, "%s: remove directory '%s'? ", 66 fprintf(stderr, "%s: remove directory '%s'? ",