mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
vircgroupv1: refactor virCgroupV1DetectPlacement
Remove one level of indentation by splitting the condition. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9c1693eff4
commit
5f56dd7c83
@ -339,9 +339,15 @@ virCgroupV1DetectPlacement(virCgroupPtr group,
|
|||||||
for (i = 0; i < VIR_CGROUP_CONTROLLER_LAST; i++) {
|
for (i = 0; i < VIR_CGROUP_CONTROLLER_LAST; i++) {
|
||||||
const char *typestr = virCgroupV1ControllerTypeToString(i);
|
const char *typestr = virCgroupV1ControllerTypeToString(i);
|
||||||
|
|
||||||
if (virCgroupV1MountOptsMatchController(controllers, typestr) &&
|
if (!virCgroupV1MountOptsMatchController(controllers, typestr))
|
||||||
group->legacy[i].mountPoint != NULL &&
|
continue;
|
||||||
group->legacy[i].placement == NULL) {
|
|
||||||
|
if (!group->legacy[i].mountPoint)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (group->legacy[i].placement)
|
||||||
|
continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* selfpath == "/" + path="" -> "/"
|
* selfpath == "/" + path="" -> "/"
|
||||||
* selfpath == "/libvirt.service" + path == "" -> "/libvirt.service"
|
* selfpath == "/libvirt.service" + path == "" -> "/libvirt.service"
|
||||||
@ -357,7 +363,6 @@ virCgroupV1DetectPlacement(virCgroupPtr group,
|
|||||||
path);
|
path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user