From nobody Mon Feb 9 00:02: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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1598271092; cv=none; d=zohomail.com; s=zohoarc; b=SWg0R+9al6VCs+j1/qO+76F3yooaJffyDIcJxwklWPtPUbSQ6CUzWg5eGFJT7P2hI4V06RsI8Ui+Ze74m3oJ8kSu5zbFRPK0CW+EdNPv6XmIbqSOUiEEiMcPiGP/r0wEUYuiBnul7D8W1QrtYzg33VLcT+tqzWqZ8pN+m05AP1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598271092; h=Content-Type:Content-Transfer-Encoding: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=KW3bNmIhlsJeKJFpmKtDSwSJBBpYn7oIMssObBnDpMI=; b=jn0wEfTDAmriK5SxTlHKQG3PEUXI5blI9nYLLuEO4A4O98yhuDCoXWnqLc9YqfvQIpASjzrFFBG7eNMXaHpVLIMwSMoZdjl53QZ7GEYCnymnlkuVkF7mViH9GSnfadq82w56tjP4+3Hh2KB81o+eQKYNcfMujOlj6BUNGSwoooI= 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=pass 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 1598271092854264.15031194468713; Mon, 24 Aug 2020 05:11:32 -0700 (PDT) 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-21-6iahL1NOP3yLZ5sH1taVLA-1; Mon, 24 Aug 2020 08:11:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75AB38030DA; Mon, 24 Aug 2020 12:11:23 +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 56E7C7C674; Mon, 24 Aug 2020 12:11:23 +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 23F9866915; Mon, 24 Aug 2020 12:11:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 07OC669A030802 for ; Mon, 24 Aug 2020 08:06:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2AEC710013C1; Mon, 24 Aug 2020 12:06:06 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8761110013D9 for ; Mon, 24 Aug 2020 12:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598271091; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=KW3bNmIhlsJeKJFpmKtDSwSJBBpYn7oIMssObBnDpMI=; b=OZB9Y0FhDEU3EGL410S5S/OQF2ahyX9qnEConCWG/xQzFVBoaOxOQhYsmYFRDjDRbIS8qk o9u1TGBCWxJpsC1oBaxKpNH4IXOwZaMBSTLYHGLf/EkyFZk/DjwcPcZuGAdtXSag0CMzde AGvtDb43fZn7SQGfQ88+mY1fc+svfWo= X-MC-Unique: 6iahL1NOP3yLZ5sH1taVLA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/7] qemuMigrationParamsFromFlags: Use 'g_autoptr' to remove 'error:' label Date: Mon, 24 Aug 2020 14:05:54 +0200 Message-Id: <16ac42155104f7f85058d5e5ef89bf201199e820.1598270694.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration_params.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index f466c3c4f6..03d8d4fb49 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -534,7 +534,7 @@ qemuMigrationParamsFromFlags(virTypedParameterPtr param= s, unsigned long flags, qemuMigrationParty party) { - qemuMigrationParamsPtr migParams; + g_autoptr(qemuMigrationParams) migParams =3D NULL; size_t i; if (!(migParams =3D qemuMigrationParamsNew())) @@ -565,14 +565,14 @@ qemuMigrationParamsFromFlags(virTypedParameterPtr par= ams, if (qemuMigrationParamsGetTPInt(migParams, item->param, params, nparams, item->typedParam, item->unit) < 0) - goto error; + return NULL; break; case QEMU_MIGRATION_PARAM_TYPE_ULL: if (qemuMigrationParamsGetTPULL(migParams, item->param, params, nparams, item->typedParam, item->unit) < 0) - goto error; + return NULL; break; case QEMU_MIGRATION_PARAM_TYPE_BOOL: @@ -581,7 +581,7 @@ qemuMigrationParamsFromFlags(virTypedParameterPtr param= s, case QEMU_MIGRATION_PARAM_TYPE_STRING: if (qemuMigrationParamsGetTPString(migParams, item->param, par= ams, nparams, item->typedParam) = < 0) - goto error; + return NULL; break; } } @@ -591,24 +591,20 @@ qemuMigrationParamsFromFlags(virTypedParameterPtr par= ams, !(flags & VIR_MIGRATE_AUTO_CONVERGE)) { virReportError(VIR_ERR_INVALID_ARG, "%s", _("Turn auto convergence on to tune it")); - goto error; + return NULL; } if (migParams->params[QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS].set && !(flags & VIR_MIGRATE_PARALLEL)) { virReportError(VIR_ERR_INVALID_ARG, "%s", _("Turn parallel migration on to tune it")); - goto error; + return NULL; } if (qemuMigrationParamsSetCompression(params, nparams, flags, migParam= s) < 0) - goto error; - - return migParams; + return NULL; - error: - qemuMigrationParamsFree(migParams); - return NULL; + return g_steal_pointer(&migParams); } --=20 2.26.2