Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 9eb0042e..6da1cd40 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -190,15 +190,13 @@ int rmrf(const char *path)
if(!unlink(path)) {
return 0;
} else {
- if(errno == ENOENT) {
+ switch(errno) {
+ case ENOENT:
return 0;
- } else if(errno == EPERM) {
- /* fallthrough */
- } else if(errno == EISDIR) {
- /* fallthrough */
- } else if(errno == ENOTDIR) {
- return 1;
- } else {
+ case EPERM:
+ case EISDIR:
+ break;
+ default:
/* not a directory */
return 1;
}