From nobody Mon Feb 9 06:34:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1598271018; cv=none; d=zohomail.com; s=zohoarc; b=O2KpL9uxMZIkzn2cehUV1IGSqVNoYzhri0UJ7IPP5vTlgfisLUXV19D5uijE34BpANfxl246GuCLDPhYjkO+ra5bUsBABvunndxTSynRDLP26dhh57oRz99nJpaOjUIHF4fuVE/gpzG2YJ6aB0ciraIIj46gFbXFicDbvdvuVw0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598271018; 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=C2yEo4SHz/aFw5FAmSARxsfXWGYtV9Sms3WXwvLdQts=; b=f44mUlfE0vdo0CUMct2ymzEuJq0hDxupbAqTbqFDnQL822Fr6A5b+UisbpRhirKaTbwQTEDhzlgXtJn+kIWsYSSiqyDTaDhekR+6KgshPnyLriIeEqiiwAgoXOGupLEgevrgelbWIaWzkx6xkukwnF58BvrXBr/AZaBHWwcO2EU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 159827101830297.85600605275079; Mon, 24 Aug 2020 05:10:18 -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-337-O_VjVl-lOL2q2doGZaQWBg-1; Mon, 24 Aug 2020 08:10:14 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1122A81F00C; Mon, 24 Aug 2020 12:10:09 +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 9E1B81972B; Mon, 24 Aug 2020 12:10:08 +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 C1FF5668E0; Mon, 24 Aug 2020 12:10:06 +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 07OC6754030812 for ; Mon, 24 Aug 2020 08:06:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3BB0F10013C4; Mon, 24 Aug 2020 12:06:07 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E7F010013C1 for ; Mon, 24 Aug 2020 12:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598271016; 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=C2yEo4SHz/aFw5FAmSARxsfXWGYtV9Sms3WXwvLdQts=; b=FssVQJkMO85T5Yxtg7ABRgpCTP+V2gw5+lW4ie4SOX/5ICCs1EplDV4ln/5Xx8g4GOT4Dw Rg0Ch+nDByS3ft4AHaim8OPYVzTnadSoOf+DFU7l2NZjrZXeHYyMcPGatVMYwPb1CmGtpB zmkWjrfsy1WLUz9QZq+PooHox3872E4= X-MC-Unique: O_VjVl-lOL2q2doGZaQWBg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/7] qemuMigrationParamsFromJSON: Unify return value handling with other functions Date: Mon, 24 Aug 2020 14:05:55 +0200 Message-Id: <06e2295ff43ab44be5cf08441a701f11b9016455.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.84 on 10.5.11.23 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" This function doesn't have an overly verbose cleanup section as there isn't any error code path. Unify it with the rest of the functions which will simplify adding a possible error path. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration_params.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index 03d8d4fb49..3ed55c2ab4 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -670,7 +670,7 @@ qemuMigrationParamsDump(qemuMigrationParamsPtr migParam= s, qemuMigrationParamsPtr qemuMigrationParamsFromJSON(virJSONValuePtr params) { - qemuMigrationParamsPtr migParams; + g_autoptr(qemuMigrationParams) migParams =3D NULL; qemuMigrationParamValuePtr pv; const char *name; const char *str; @@ -680,7 +680,7 @@ qemuMigrationParamsFromJSON(virJSONValuePtr params) return NULL; if (!params) - return migParams; + return g_steal_pointer(&migParams); for (i =3D 0; i < QEMU_MIGRATION_PARAM_LAST; i++) { name =3D qemuMigrationParamTypeToString(i); @@ -711,7 +711,7 @@ qemuMigrationParamsFromJSON(virJSONValuePtr params) } } - return migParams; + return g_steal_pointer(&migParams); } --=20 2.26.2