summaryrefslogtreecommitdiff
path: root/libbb/remove_file.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-03-27 22:45:44 +0000
committerDenis Vlasenko2008-03-27 22:45:44 +0000
commitcf26ab70c11416401cd53e6a6a5fb4d5c2583246 (patch)
tree70c34ca3fb93d01700181279a9875900c02abc08 /libbb/remove_file.c
parente1caabbb75ecf3537586aa3bbbe5921f3f1d43b7 (diff)
downloadbusybox-cf26ab70c11416401cd53e6a6a5fb4d5c2583246.zip
busybox-cf26ab70c11416401cd53e6a6a5fb4d5c2583246.tar.gz
mdev: plug a few memory and fd leaks; simplify code a bit
Diffstat (limited to 'libbb/remove_file.c')
-rw-r--r--libbb/remove_file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/remove_file.c b/libbb/remove_file.c
index 3edc91d..21878dc 100644
--- a/libbb/remove_file.c
+++ b/libbb/remove_file.c
@@ -82,8 +82,10 @@ int remove_file(const char *path, int flags)
}
/* !ISDIR */
- if ((!(flags & FILEUTILS_FORCE) && access(path, W_OK) < 0
- && !S_ISLNK(path_stat.st_mode) && isatty(0))
+ if ((!(flags & FILEUTILS_FORCE)
+ && access(path, W_OK) < 0
+ && !S_ISLNK(path_stat.st_mode)
+ && isatty(0))
|| (flags & FILEUTILS_INTERACTIVE)
) {
fprintf(stderr, "%s: remove '%s'? ", applet_name, path);