From c02a08ec5a802c7afe4935bb5e85cf3c38866427 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Thu, 2 Jul 2020 23:21:25 -0400 Subject: [PATCH] lxc: eliminate unnecessary labels MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Laine Stump Reviewed-by: Ján Tomko --- src/lxc/lxc_controller.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 01cdeb29db..ae6b737b60 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -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//{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; } /** -- 2.47.2