From nobody Sun Feb 8 19:39:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1578347926; cv=none; d=zohomail.com; s=zohoarc; b=B8/XKhdIUGqIqKHQgeKGDExUttAzGzj0I2RdAhZWELf6fey8tRGgbOHKb4UIJZFmsoEq4Ir09+HxQ4TcdgNOwZr8n/qkVPKQfepStgpj+e9bFTWmU3wGDm59RgHeJPohptEyPrFuRFts69DwnzRMRESz/7wPOHkkiXNTvJW/lHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578347926; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g7lmZ+YzjaSLkGv8u2HWewedK8thHhpk95P4J+zL8yY=; b=cMfWMykBJ2MYSB7K82U9eH4Q2JgsGSrd0thbgS9SxeTyQ8g/zmh46Gnor3ViaIMERrcOG22QdcoJLHqv1afEGXeAiMD2RLJKk5tmAR8kfNLzaSqVH5Qc4eqaKQGgtAouCYKpFfSBgdJDL0AQ3//iLcyGBMYuMNPQlJaRkMC6zU8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1578347926505813.7173253566827; Mon, 6 Jan 2020 13:58:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-BurnZ5pPNdKlIO23WJV-yA-1; Mon, 06 Jan 2020 16:58:44 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C70B11854339; Mon, 6 Jan 2020 21:58:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A284D5C1B2; Mon, 6 Jan 2020 21:58:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 56DE981C87; Mon, 6 Jan 2020 21:58:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 006LwSJ0007333 for ; Mon, 6 Jan 2020 16:58:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 66A9510EE799; Mon, 6 Jan 2020 21:58:28 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5DA5D101B56E for ; Mon, 6 Jan 2020 21:58:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 23141101D237 for ; Mon, 6 Jan 2020 21:58:28 +0000 (UTC) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-4juzqsyROJeMilHq5D6Mfg-1; Mon, 06 Jan 2020 16:58:26 -0500 Received: by mail-qk1-f175.google.com with SMTP id z76so41255635qka.2 for ; Mon, 06 Jan 2020 13:58:25 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:655b:9e1c:e865:3705:e1df]) by smtp.gmail.com with ESMTPSA id x34sm23898440qtd.20.2020.01.06.13.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 13:58:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578347925; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=g7lmZ+YzjaSLkGv8u2HWewedK8thHhpk95P4J+zL8yY=; b=X9zxJARYUPPNzD+7zGKbWAN0zaPCiv09Ud8/0Wu4FDnURqUzLtSJOvHIFkNmfzfcwCEgNH 1mWIoyQtcp81fPRM4dA1Txc1mLbkFlekw4BawRSfsQMUxlYNPSXs6hZjP6m8z3eLxjVVoW 6Y+fp7hsPzrp8KN7ji4EILHG8DJo6mY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oT+1i+3a7bf6wRQTG/XOgxC03bliJ/BEHXz93NgtXaY=; b=Ysg13QgXV1cq8NtGzaLMUZqsQsT0WnmZE7YeJVLtdzgIU1CJKeV1vf1ANWkX3xGere mSM6QrKGrDhKYpC90EkmHBcIeZPE6puvbh+zeBD4csVHTqM3E9w8NmLuhlrcm0DKxHw9 PZG3WOD6NmPB+fqGjL1DAQHmVuN1d/8+JDpaaZpg2fboGFUMaDqpWTGygo9fJNoIIRpf lAKJ7eUdaKFmmT1hBbJiINYDEMPf6heQv3AEax/fVI0IeBGjGt96Kmri7oi1UsSEWe6G DwsXsY+8yM7epYuwg4oQcE4mQsnqwVr9Z3LEhn4yaQXCFXb5+XUbU8XqAa9jpGF6+dPW jPbQ== X-Gm-Message-State: APjAAAWwEr9g6VIpWFp7H8hkijpQ7Osb3e9f+Ce3QDM5oBBheX2dGMoV 1XbANlRs+jE29Kr8xiRHgequ4srL X-Google-Smtp-Source: APXvYqxRDEMgKUrjrF9eadQAMTUTmkVAagXl9QPstFGY4xK2DFBhFAeQEHJSXcqTJ/hC/PlKpD7BWQ== X-Received: by 2002:a37:a086:: with SMTP id j128mr82202854qke.459.1578347905439; Mon, 06 Jan 2020 13:58:25 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 6 Jan 2020 18:57:43 -0300 Message-Id: <20200106215750.361615-20-danielhb413@gmail.com> In-Reply-To: <20200106215750.361615-1-danielhb413@gmail.com> References: <20200106215750.361615-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: 4juzqsyROJeMilHq5D6Mfg-1 X-MC-Unique: BurnZ5pPNdKlIO23WJV-yA-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 006LwSJ0007333 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 19/26] vbox: remove unneeded labels X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza --- src/vbox/vbox_MSCOMGlue.c | 11 +++++------ src/vbox/vbox_snapshot_conf.c | 9 +++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/vbox/vbox_MSCOMGlue.c b/src/vbox/vbox_MSCOMGlue.c index 18a291a0d8..5cc3f5c7c8 100644 --- a/src/vbox/vbox_MSCOMGlue.c +++ b/src/vbox/vbox_MSCOMGlue.c @@ -357,24 +357,24 @@ vboxLookupRegistryValue(HKEY key, const char *keyName= , const char *valueName) if (status !=3D ERROR_SUCCESS) { VIR_ERROR(_("Could not query registry value '%s\\%s'"), keyName, valueName); - goto cleanup; + return NULL; } =20 if (type !=3D REG_SZ) { VIR_ERROR(_("Registry value '%s\\%s' has unexpected type"), keyName, valueName); - goto cleanup; + return NULL; } =20 if (length < 2) { VIR_ERROR(_("Registry value '%s\\%s' is too short"), keyName, valueName); - goto cleanup; + return NULL; } =20 /* +1 for the null-terminator if it's missing */ if (VIR_ALLOC_N(value, length + 1) < 0) - goto cleanup; + return NULL; =20 status =3D RegQueryValueEx(key, valueName, NULL, NULL, (LPBYTE)value, = &length); =20 @@ -382,13 +382,12 @@ vboxLookupRegistryValue(HKEY key, const char *keyName= , const char *valueName) VIR_FREE(value); VIR_ERROR(_("Could not query registry value '%s\\%s'"), keyName, valueName); - goto cleanup; + return NULL; } =20 if (value[length - 1] !=3D '\0') value[length] =3D '\0'; =20 - cleanup: return value; } =20 diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c index db6c389a64..4cd4e3a983 100644 --- a/src/vbox/vbox_snapshot_conf.c +++ b/src/vbox/vbox_snapshot_conf.c @@ -1228,23 +1228,20 @@ virVBoxSnapshotConfIsCurrentSnapshot(virVBoxSnapsho= tConfMachinePtr machine, if (machine =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Machine is null")); - goto cleanup; + return 0; } if (snapshotName =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("snapshotName is null")); - goto cleanup; + return 0; } snapshot =3D virVBoxSnapshotConfSnapshotByName(machine->snapshot, snap= shotName); if (snapshot =3D=3D NULL) { virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, _("Unable to find the snapshot %s"), snapshotName); - goto cleanup; + return 0; } return STREQ(snapshot->uuid, machine->currentSnapshot); - - cleanup: - return 0; } =20 /* --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list