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:
parent
d895cae16c
commit
cb8eae24c9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user