summaryrefslogtreecommitdiff
path: root/src/util/vircgroupv1.c
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb413@gmail.com>2019-10-21 15:19:04 -0300
committerJán Tomko <jtomko@redhat.com>2019-11-12 17:54:01 +0100
commit93af79fba3fd75a8df6b7ca608719dd97f9511a0 (patch)
tree2b6ab6848be24428727147cc54c91a3a99066f84 /src/util/vircgroupv1.c
parent5b05d99dabea3f7337c1a59eaec2ee2a1382d768 (diff)
downloadlibvirt-93af79fba3fd75a8df6b7ca608719dd97f9511a0.tar.gz
util: remove unneeded cleanup labels
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'src/util/vircgroupv1.c')
-rw-r--r--src/util/vircgroupv1.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c
index f594b9c6db..c1083b6d18 100644
--- a/src/util/vircgroupv1.c
+++ b/src/util/vircgroupv1.c
@@ -696,7 +696,6 @@ virCgroupV1AddTask(virCgroupPtr group,
pid_t pid,
unsigned int flags)
{
- int ret = -1;
size_t i;
for (i = 0; i < VIR_CGROUP_CONTROLLER_LAST; i++) {
@@ -712,12 +711,10 @@ virCgroupV1AddTask(virCgroupPtr group,
continue;
if (virCgroupSetValueI64(group, i, "tasks", pid) < 0)
- goto cleanup;
+ return -1;
}
- ret = 0;
- cleanup:
- return ret;
+ return 0;
}
@@ -1818,18 +1815,13 @@ static int
virCgroupV1AllowAllDevices(virCgroupPtr group,
int perms)
{
- int ret = -1;
-
if (virCgroupV1AllowDevice(group, 'b', -1, -1, perms) < 0)
- goto cleanup;
+ return -1;
if (virCgroupV1AllowDevice(group, 'c', -1, -1, perms) < 0)
- goto cleanup;
-
- ret = 0;
+ return -1;
- cleanup:
- return ret;
+ return 0;
}