diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 46042eb631..f4529ccd4f 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -980,9 +980,6 @@ virSecretLoadAllConfigs(virSecretObjListPtr secrets, char *path; virSecretObjPtr secret; - if (STREQ(de->d_name, ".") || STREQ(de->d_name, "..")) - continue; - if (!virFileHasSuffix(de->d_name, ".xml")) continue; diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 7b021d84f6..728baf3e4d 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -530,10 +530,6 @@ networkMigrateStateFiles(virNetworkDriverStatePtr driver) entry->d_type != DT_REG) continue; - if (STREQ(entry->d_name, ".") || - STREQ(entry->d_name, "..")) - continue; - if (virAsprintf(&oldPath, "%s/%s", oldStateDir, entry->d_name) < 0) goto cleanup; diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index c76c94f68a..1fd46cc85a 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -3637,10 +3637,6 @@ virCgroupKillRecursiveInternal(virCgroupPtr group, } while ((direrr = virDirRead(dp, &ent, keypath)) > 0) { - if (STREQ(ent->d_name, ".")) - continue; - if (STREQ(ent->d_name, "..")) - continue; if (ent->d_type != DT_DIR) continue; @@ -3964,10 +3960,6 @@ int virCgroupSetOwner(virCgroupPtr cgroup, } while ((direrr = virDirRead(dh, &de, base)) > 0) { - if (STREQ(de->d_name, ".") || - STREQ(de->d_name, "..")) - continue; - if (virAsprintf(&entry, "%s/%s", base, de->d_name) < 0) goto cleanup; diff --git a/src/util/virfile.c b/src/util/virfile.c index d6419964c9..355255e2b4 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -951,10 +951,6 @@ int virFileDeleteTree(const char *dir) while ((direrr = virDirRead(dh, &de, dir)) > 0) { struct stat sb; - if (STREQ(de->d_name, ".") || - STREQ(de->d_name, "..")) - continue; - if (virAsprintf(&filepath, "%s/%s", dir, de->d_name) < 0) goto cleanup; diff --git a/src/util/virpci.c b/src/util/virpci.c index 5cb5d3ab09..307892bddb 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -2701,10 +2701,6 @@ virPCIGetNetName(char *device_link_sysfs_path, char **netname) goto out; while (virDirRead(dir, &entry, pcidev_sysfs_net_path) > 0) { - if (STREQ(entry->d_name, ".") || - STREQ(entry->d_name, "..")) - continue; - /* Assume a single directory entry */ if (VIR_STRDUP(*netname, entry->d_name) > 0) ret = 0;