1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00

Another unneeded NULL check removed

Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Silvan Jegen 2014-01-28 17:50:43 +01:00 committed by Allan McRae
parent d895cae16c
commit cb8eae24c9

View File

@ -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);