[pacman-dev] [PATCH 2/4] Another unneeded NULL check removed
Silvan Jegen
s.jegen at gmail.com
Tue Jan 28 11:50:43 EST 2014
Signed-off-by: Silvan Jegen <s.jegen at gmail.com>
---
src/pacman/util.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 58b0cec..4aaa98f 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -206,12 +206,10 @@ int rmrf(const char *path)
return 1;
}
for(dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
- if(dp->d_name) {
- if(strcmp(dp->d_name, "..") != 0 && strcmp(dp->d_name, ".") != 0) {
- char name[PATH_MAX];
- snprintf(name, PATH_MAX, "%s/%s", path, dp->d_name);
- errflag += rmrf(name);
- }
+ if(strcmp(dp->d_name, "..") != 0 && strcmp(dp->d_name, ".") != 0) {
+ char name[PATH_MAX];
+ snprintf(name, PATH_MAX, "%s/%s", path, dp->d_name);
+ errflag += rmrf(name);
}
}
closedir(dirp);
--
1.8.5.3
More information about the pacman-dev
mailing list