]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: eliminate unnecessary labels
authorLaine Stump <laine@redhat.com>
Fri, 3 Jul 2020 03:21:25 +0000 (23:21 -0400)
committerLaine Stump <laine@redhat.com>
Wed, 8 Jul 2020 20:36:05 +0000 (16:36 -0400)
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/lxc/lxc_controller.c

index 01cdeb29dbd15f07a3e1a8dea6ae16e19b2626d6..ae6b737b602a24e90080b9653b68f1b5cc076726 100644 (file)
@@ -1380,13 +1380,12 @@ virLXCControllerSetupUsernsMap(virDomainIdMapEntryPtr map,
 {
     g_auto(virBuffer) map_value = VIR_BUFFER_INITIALIZER;
     size_t i;
-    int ret = -1;
 
     /* The kernel supports up to 340 lines in /proc/<pid>/{g,u}id_map */
     if (num > 340) {
         virReportError(VIR_ERR_INVALID_ARG, "%s",
                        _("Too many id mappings defined."));
-        goto cleanup;
+        return -1;
     }
 
     for (i = 0; i < num; i++)
@@ -1397,12 +1396,10 @@ virLXCControllerSetupUsernsMap(virDomainIdMapEntryPtr map,
 
     if (virFileWriteStr(path, virBufferCurrentContent(&map_value), 0) < 0) {
         virReportSystemError(errno, _("unable write to %s"), path);
-        goto cleanup;
+        return -1;
     }
 
-    ret = 0;
- cleanup:
-    return ret;
+    return 0;
 }
 
 /**