diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2014-01-28 17:50:43 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-01-30 04:40:25 +0100 |
commit | cb8eae24c9976c023c8ec2aff9bf305202edc4d7 (patch) | |
tree | 3decd4bf7390d3578daf122ebbdbd779bcb30d13 /src | |
parent | d895cae16cc97e5f1e3f95eb748a99161678f8ee (diff) | |
download | pacman-cb8eae24c9976c023c8ec2aff9bf305202edc4d7.tar.gz pacman-cb8eae24c9976c023c8ec2aff9bf305202edc4d7.tar.xz |
Another unneeded NULL check removed
Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/util.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index cbe371d6..d7a5e01f 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); |