From nobody Wed May 1 08:57:00 2024 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=1626688574; cv=none; d=zohomail.com; s=zohoarc; b=Wm+ymCKpqf0sxp21RC1uub1SJd5O+o8e5hNwC8BCsdry3Sl1XduIhzemo4RArw44qw4tJuTMCRe0cItrtYAZidLG3kVPlFjhC2l0o4Yg/azMq0CQ575XG+szGZcwisBsaVLrBmbrfe5YC+bHjaFI4wev+wfrkZMOsD/xrJdf6Ao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688574; 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=wR5mHvwfspj5o4HndgRqoFmeqya/Ku1ftKnMZb4VSpM=; b=XwnXD5xWXA7m1/vYPMZxRJ7J2ipAIJ0qAYGgF6nGy2IvJVZmwaB9Lb7YmmBu2gDRL7Fgv8Wa8gvm+2QLvNb7NQI0XrKXGjKyEPrvon+G1ChQP8fxFfSEZLulkDYpfFz/5pXDVepubIs8B2rJrd7EPJZUdkGzS3uprSmDBcBsJHk= 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) 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 1626688574221702.9017976589234; Mon, 19 Jul 2021 02:56:14 -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-545-zUxj7W2qMrCEWG0Woh6TjQ-1; Mon, 19 Jul 2021 05:56:11 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C7B70100C612; Mon, 19 Jul 2021 09:56:05 +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 EBBB25D6A1; Mon, 19 Jul 2021 09:56:03 +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 E72324EA29; Mon, 19 Jul 2021 09:56:01 +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 16J9u0Zn002562 for ; Mon, 19 Jul 2021 05:56:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id A900A10074E1; Mon, 19 Jul 2021 09:56:00 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3EC710016F2; Mon, 19 Jul 2021 09:55:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688573; 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=wR5mHvwfspj5o4HndgRqoFmeqya/Ku1ftKnMZb4VSpM=; b=RPk8LFLiWt2yPAyhqt+LrinIJ7XclTiK1PX08+HoHMhuBrDu0h0UbGtY/ZjoBLxLX7ilNZ rT+fueUBQ5nxFXo8R1RfZN6uBXZ/5vXpQvA9h2Q3q88bZhFFQ4TwTYejcso8uSjE4jh4rB uMSm1JKaMfNcaUlVFlUMo6fxjf5TGGM= X-MC-Unique: zUxj7W2qMrCEWG0Woh6TjQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 01/10] qemuStateInitialize: `virHashNew` cannot return NULL Date: Mon, 19 Jul 2021 11:55:45 +0200 Message-Id: <20210719095554.26137-2-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688574935100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index df44c3fbd0..521063d438 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -753,8 +753,7 @@ qemuStateInitialize(bool privileged, if (!(qemu_driver->hostdevMgr =3D virHostdevManagerGetDefault())) goto error; =20 - if (!(qemu_driver->sharedDevices =3D virHashNew(qemuSharedDeviceEntryF= ree))) - goto error; + qemu_driver->sharedDevices =3D virHashNew(qemuSharedDeviceEntryFree); =20 if (qemuMigrationDstErrorInit(qemu_driver) < 0) goto error; --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626688574; cv=none; d=zohomail.com; s=zohoarc; b=kCq9gG8Ibg72z4z9V9qN25NVyIUW4QQ8Lg87HahRKhv/Y2Wd9DyVqzWjPxjVg2J8+gupkOIVk4Ao63UY1Nxl3UruYUdSsg1MzrI6RnTT/nJShCxP0FzUvkPd861dxLRvaWrbKtGEIBFcDIc0d9jDfFPcM/N++5ZcxSwQJmLMSk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688574; 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=O4bvZekwVveU2Da/6o3fw+/418MqfrUfaVvLG65X2h0=; b=XgyNU1MiQORx9QMEMNRCVuSAxXu0n8HQu0x6BE6guQ9Zc1MUPhYl/0rNOlYNrqayQA71IOVLd9VUX/7T//PIbDGdbQk30D03cQrWyxl5ZWUmS6LNMbTXcNI1Jcvh9eHib2+5iUTYLWw1cq41YqitX/DomRt3kb4P6+8468Bnvpc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626688574376246.56324566509807; Mon, 19 Jul 2021 02:56:14 -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-488-yo8Il_niMZer_IexO2du5A-1; Mon, 19 Jul 2021 05:56:11 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6738D195D565; Mon, 19 Jul 2021 09:56:06 +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 B312060C82; Mon, 19 Jul 2021 09:56:05 +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 C0B434EA37; Mon, 19 Jul 2021 09:56:04 +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 16J9u1wg002569 for ; Mon, 19 Jul 2021 05:56:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id B228510074E1; Mon, 19 Jul 2021 09:56:01 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08BD610016F2; Mon, 19 Jul 2021 09:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688573; 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=O4bvZekwVveU2Da/6o3fw+/418MqfrUfaVvLG65X2h0=; b=GgY7vg1G20rOFf72bwfa5R3paxJRya65M7Nz+2hIdurYBZ5W2crvL/WLkBSU/p2eBBsdy9 VD6Pl5kOaJk6HhkNIn4bivGhRXemoG5vuwrp3t4PFAHvwLD/Ka59SKgWlqZqOSb7SPlqRy aGR5OlUZO1HcR6U3XMQsgXXA+6KV3qc= X-MC-Unique: yo8Il_niMZer_IexO2du5A-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 02/10] qemuMonitorGetPRManagerInfo: `virHashNew` cannot return NULL Date: Mon, 19 Jul 2021 11:55:46 +0200 Message-Id: <20210719095554.26137-3-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688574859100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index f66a3457c1..940eeab9a8 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4522,8 +4522,7 @@ qemuMonitorGetPRManagerInfo(qemuMonitor *mon, =20 QEMU_CHECK_MONITOR(mon); =20 - if (!(info =3D virHashNew(g_free))) - goto cleanup; + info =3D virHashNew(g_free); =20 if (qemuMonitorJSONGetPRManagerInfo(mon, info) < 0) goto cleanup; --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1626688585; cv=none; d=zohomail.com; s=zohoarc; b=b0bElT0AnXcfCwNwtl0HdDul2PklTtq0BQYprdOksRUeqYIalqZ+L2XbTucAmhVr6ufEaf1nQbigZ1zsGhWxqLKvgCXHX9/saafLXMrYH/s06QEG+rf4scNJQTWxHVBGCk0cvLvSKKFgAk/hTfXPZyOk9KFKcGrHg/wShsZ+T1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688585; 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=0GKwWcUpD02rTskFpTRODjKy40sD08VioGG640pIYNI=; b=MguhrK/rAGH4eY62VvOPifJIb2IpGzApR9zVucTOE3QGHq/p4cS6u6y4t3O+RbFdUVcpZc7p1gqOyh11+iEM28u3N/93YfiHIUrsaSOAIrfLdketbvKjjVGaduNxG8bcGqcmPPdPkenMXCwix8g9mPBDKucrWCegM288LKjdy/8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626688585021635.1526263462863; Mon, 19 Jul 2021 02:56:25 -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-572-ajN3kUANNAyzCdLAzUSWKw-1; Mon, 19 Jul 2021 05:56:22 -0400 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 86F70804142; Mon, 19 Jul 2021 09:56:17 +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 6350E5C22A; Mon, 19 Jul 2021 09:56:17 +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 319844EA3B; Mon, 19 Jul 2021 09:56:17 +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 16J9u2R9002579 for ; Mon, 19 Jul 2021 05:56:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id BBD0510074FD; Mon, 19 Jul 2021 09:56:02 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 119B410074E1; Mon, 19 Jul 2021 09:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688584; 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=0GKwWcUpD02rTskFpTRODjKy40sD08VioGG640pIYNI=; b=IfUGH3bsDwk5tGVMTd/dQ4RENvQq5kD3i3wJEtYVncL8lq8lhMOCZtr0fj/o+53AnpzVMk +CiifDt42nolR4nYI8NfOl4dyhj1SQhE2jJMO2XmReDHLKOy+vxjMl7XF18+MgFO9inahR HwqG8QkTvLVIX7y29rGb5hhhdXaSHDs= X-MC-Unique: ajN3kUANNAyzCdLAzUSWKw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 03/10] qemuMonitorGetPRManagerInfo: Use automatic memory management Date: Mon, 19 Jul 2021 11:55:47 +0200 Message-Id: <20210719095554.26137-4-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688585922100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 940eeab9a8..36b1f15c7d 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4516,21 +4516,18 @@ qemuMonitorGetPRManagerInfo(qemuMonitor *mon, GHashTable **retinfo) { int ret =3D -1; - GHashTable *info =3D NULL; + g_autoptr(GHashTable) info =3D virHashNew(g_free); =20 *retinfo =3D NULL; =20 QEMU_CHECK_MONITOR(mon); =20 - info =3D virHashNew(g_free); - if (qemuMonitorJSONGetPRManagerInfo(mon, info) < 0) goto cleanup; =20 *retinfo =3D g_steal_pointer(&info); ret =3D 0; cleanup: - virHashFree(info); return ret; } =20 --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 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=1626688588; cv=none; d=zohomail.com; s=zohoarc; b=NWmxMcJUkye/wAWj1opHx2fNGsrw8/VG7UdoX8C+xIb8lPR+lftusufUCMO7O6rGCsgmh6wGEtBL6HF7lynTcmAd/dwEohcKZlTPfX6sN7jTM52c7WnObBs9B+aCz6+4fZy/cJaXnKh75DcyznlZ+TaGo9NOi4OBxmtL7bA7h0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688588; 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=fPriY+MW+lgXZdCYw0aNEOO8nWOTZ3I/vSUpQ6FeKvw=; b=UfNWrxDufRnjauBdFCSIZLBZrS/3AfCl3YQXBTwnTPq+t6ajUdCZsbCs8V7ulbnhg567/ZIJe4L4P4HaxD1wvkhDWCcPPFVff07DygF2G+LQFTXlSSqpCsV02U6h+JQcB+YrlMED4ZS9+DD2cVYs34jIYI3BapLRKRUodKz3f1U= 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) 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 1626688588973685.0234114174182; Mon, 19 Jul 2021 02:56:28 -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-507-k-9ZOPhQOJG9hrgl0QfTwA-1; Mon, 19 Jul 2021 05:56:26 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC0BB80365C; Mon, 19 Jul 2021 09:56:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B02D760877; Mon, 19 Jul 2021 09:56:20 +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 6EDDF1809C9A; Mon, 19 Jul 2021 09:56:20 +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 16J9u3cQ002584 for ; Mon, 19 Jul 2021 05:56:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id C594F10016F2; Mon, 19 Jul 2021 09:56:03 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B74910074E1; Mon, 19 Jul 2021 09:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688588; 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=fPriY+MW+lgXZdCYw0aNEOO8nWOTZ3I/vSUpQ6FeKvw=; b=c4l2it6KJPOkfnYJS8ZiWd5dn2WLqjNOooQoE6qheve9omw4Hybnp+VTxrQG56yJtcuX6T txmQ1gXNB4DitqcLxr4Dfk/ckv1uoiDXvO45TsW66SNjZV+J8Roxi3kX985BjC8SB6n1rV 7AjX2pS8JrUnfBtcChpWTbGbW/Ic2a8= X-MC-Unique: k-9ZOPhQOJG9hrgl0QfTwA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 04/10] qemuMonitorGetPRManagerInfo: Remove superfluous `goto`s Date: Mon, 19 Jul 2021 11:55:48 +0200 Message-Id: <20210719095554.26137-5-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688590255100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 36b1f15c7d..b06c842a7a 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4515,7 +4515,6 @@ int qemuMonitorGetPRManagerInfo(qemuMonitor *mon, GHashTable **retinfo) { - int ret =3D -1; g_autoptr(GHashTable) info =3D virHashNew(g_free); =20 *retinfo =3D NULL; @@ -4523,12 +4522,10 @@ qemuMonitorGetPRManagerInfo(qemuMonitor *mon, QEMU_CHECK_MONITOR(mon); =20 if (qemuMonitorJSONGetPRManagerInfo(mon, info) < 0) - goto cleanup; + return -1; =20 *retinfo =3D g_steal_pointer(&info); - ret =3D 0; - cleanup: - return ret; + return 0; } =20 =20 --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 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=1626688592; cv=none; d=zohomail.com; s=zohoarc; b=RnA1ODfprtGCjzMSMtJ8HFS+PtBfosz9tB7Zl/zQTPNQQgAuCuOwCO993cquV8gqypLHFiHTZBPF2tnKlU9pv4M12HZKhfj+RweZUgsoPby8Ks1WTaOY+kDf6HKvz9obRC1CjQxRcGBdnVLh9PY4ltGEU1gzNIQYLuniTWMxyD8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688592; 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=DQLJflVg3g2D2GJZtqbvv77ZRjonNWKQNFxkQgFKYCU=; b=SZ8yiFXYCUqBf1kAhQauv8ndZ/sa0q3fx2XfDmxgLAvDX4uA7x1gzcUeUye9P7dSBQAvpb8EkmFj88c5V+nLoSCH5ISQbLVEwdBtvqHJMTqU+cp9JJXbXHtCZyHLCWW+vZoAiHQzzmg2wwDjiqCh9J1dH4w79aBa9zi58FPG+Kw= 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) 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 1626688592662573.167165330656; Mon, 19 Jul 2021 02:56: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-253-sC2iTLmPNbGMxmmpLRbe9w-1; Mon, 19 Jul 2021 05:56:30 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5865804142; Mon, 19 Jul 2021 09:56:24 +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 64A075D6CF; Mon, 19 Jul 2021 09:56:24 +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 3294F4EA40; Mon, 19 Jul 2021 09:56:24 +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 16J9u4Er002596 for ; Mon, 19 Jul 2021 05:56:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id D02CF100EB3E; Mon, 19 Jul 2021 09:56:04 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2530210074FD; Mon, 19 Jul 2021 09:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688591; 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=DQLJflVg3g2D2GJZtqbvv77ZRjonNWKQNFxkQgFKYCU=; b=Migef+rURBzUfAPVd32suqOfWg3mYnbHRvJ4luAoCi1nIzH8SayDbKZkWP07VwrMxP8Jq7 mxsmbeCi/JwEo3WuFw1w1TExM8f2VXRHcMNb8zIPVEWSy7tp5Q2Op1090NdxJOvAhH7ZX1 oXuJHyTq5XMVb+lSzWZ5P1JAZoWclrc= X-MC-Unique: sC2iTLmPNbGMxmmpLRbe9w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 05/10] qemuMonitorJSONGetAllBlockJobInfo: `virHashNew` cannot return NULL Date: Mon, 19 Jul 2021 11:55:49 +0200 Message-Id: <20210719095554.26137-6-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688594741100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 223777739d..472308e1d3 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5089,8 +5089,7 @@ qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, } =20 nr_results =3D virJSONValueArraySize(data); - if (!(blockJobs =3D virHashNew(g_free))) - goto cleanup; + blockJobs =3D virHashNew(g_free); =20 for (i =3D 0; i < nr_results; i++) { virJSONValue *entry =3D virJSONValueArrayGet(data, i); --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 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=1626688585; cv=none; d=zohomail.com; s=zohoarc; b=WVQzCzgcMhw9eZ+tO8hMf4e4kD37YEBDxX9F0VIz+Bok5334YEjkZblB6MqdEcJ3KTH3kEAORFdoweESavC6xwTj/e/OV5oORNyG3cFbnoIra1nNqKNWsChUFyWB74Nqhtrwqx99DCdnKUWcJhI3x1Wgxrnp+iaNzmXFHcsC6Ec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688585; 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=Ewyq/J+aXsp2yaoNC/3+x5s4XSRNEgIGGgfdIyCD//g=; b=KpiKG5RTfV88PSliNpUHoBtv3Rc8RuQZ/VBVOEtiKElaE3y9Ra5v0cEo4tFd1WfQ3o5+xpIeWR5stJjKrEs93N9WiW0iqgFbMAa/N1DC81eaFr0ndUPGrG25HZdQuZ5lc8qTCNiRgEJBRwaLRD20lvDBofVjRGhLkO+qvRygSEk= 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) 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 1626688585701128.92404387224724; Mon, 19 Jul 2021 02:56:25 -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-573-_ntN0PvcMPu2AB3b6IvTPg-1; Mon, 19 Jul 2021 05:56:23 -0400 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 E4EC81084F54; Mon, 19 Jul 2021 09:56:17 +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 C59245C1C5; Mon, 19 Jul 2021 09:56:17 +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 8D52D4EA3D; Mon, 19 Jul 2021 09:56:17 +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 16J9u5vG002608 for ; Mon, 19 Jul 2021 05:56:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id D912810074E1; Mon, 19 Jul 2021 09:56:05 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F93810016F2; Mon, 19 Jul 2021 09:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688584; 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=Ewyq/J+aXsp2yaoNC/3+x5s4XSRNEgIGGgfdIyCD//g=; b=IJWQKLgAKZTSBhekiJpAo4QdHE4tglk86Xy7DwLX/fWQxsKi4gQGt0jy5uBNyI9alTJ3s0 1D5qhc8R1wA8wfDdiyPNtmwZLWD4uEQkqna7gT9JA/HgvoyH6daukXvXmBpNwFRXWQddtg pLFob8caWAvhqEWJ6+DEH9O/PhisJWk= X-MC-Unique: _ntN0PvcMPu2AB3b6IvTPg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 06/10] qemuMonitorJSONGetAllBlockJobInfo: Use automatic memory management Date: Mon, 19 Jul 2021 11:55:50 +0200 Message-Id: <20210719095554.26137-7-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688585972100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 472308e1d3..59c5eedb0a 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5069,12 +5069,12 @@ GHashTable * qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, bool rawjobname) { - virJSONValue *cmd =3D NULL; - virJSONValue *reply =3D NULL; + g_autoptr(virJSONValue) cmd =3D NULL; + g_autoptr(virJSONValue) reply =3D NULL; virJSONValue *data; size_t nr_results; size_t i; - GHashTable *blockJobs =3D NULL; + g_autoptr(GHashTable) blockJobs =3D NULL; =20 cmd =3D qemuMonitorJSONMakeCommand("query-block-jobs", NULL); if (!cmd) @@ -5103,14 +5103,10 @@ qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, } =20 cleanup: - virJSONValueFree(cmd); - virJSONValueFree(reply); - return blockJobs; + return g_steal_pointer(&blockJobs); =20 error: - virHashFree(blockJobs); - blockJobs =3D NULL; - goto cleanup; + return NULL; } =20 =20 --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 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=1626688595; cv=none; d=zohomail.com; s=zohoarc; b=k9+MzNzwMUOIpzTsJ46QhZvZe8eJkyF2dl8iJl8H59R31E2UVqedDF8URQUWwvqjn5BJGr9pnOF+S/xflqk26kdgIpHbQmzUXOKzqDNiIusrMCFU6Vg3fKTcCPTHEK2y4QOE9LIo7RKvD5CyCof4MjnALSJtc4kLIaN1jJxH3Kk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688595; 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=yZC61/dPkojUyCjH2jff+XU/75QVWWmsO0a2pqRgcxo=; b=jJEYPeftrox3bz6//ciVRyLE0E72meQxkDgigmUtZYy/qw+bHg0s5rQxjZUqt2y3rDTyUO8fiFvX30zGVjp7Q269CiU295zi/ggEwF4G69OCs0WJECqxz4l49fWxfCUYP0OSX8U5AJK4j+6ZexI6VkQuTtlX73HOimZXZi414kI= 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) 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 1626688595249180.69298185560456; Mon, 19 Jul 2021 02:56:35 -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-265-ObJ2s_LvMf-91OiIsrQvsg-1; Mon, 19 Jul 2021 05:56:32 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7986B624; Mon, 19 Jul 2021 09:56:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5DCA160877; Mon, 19 Jul 2021 09:56:27 +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 27A151809CB2; Mon, 19 Jul 2021 09:56:27 +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 16J9u64b002616 for ; Mon, 19 Jul 2021 05:56:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id E24EC10074E1; Mon, 19 Jul 2021 09:56:06 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3878410016F2; Mon, 19 Jul 2021 09:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688594; 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=yZC61/dPkojUyCjH2jff+XU/75QVWWmsO0a2pqRgcxo=; b=SHZI38f/xrDvRTM+I3J4nAZt4XSmjwUn3llrGFlbe/C8kVNit8m0P8o1o9G0dfZAjrHLp0 YfaMW7jDloIhBJJxKxSSsEPEBEAxwqzoP7v8FdS8jOijsC2uqa1rlEz4WKjxbZmxv9idxS Qm+Za1bB1krPd03VIjNAz/WsUd3rqjU= X-MC-Unique: ObJ2s_LvMf-91OiIsrQvsg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 07/10] qemuMonitorJSONGetAllBlockJobInfo: Remove superfluous `goto`s Date: Mon, 19 Jul 2021 11:55:51 +0200 Message-Id: <20210719095554.26137-8-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688596744100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 59c5eedb0a..7e53e0ce84 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5074,39 +5074,34 @@ qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, virJSONValue *data; size_t nr_results; size_t i; - g_autoptr(GHashTable) blockJobs =3D NULL; + g_autoptr(GHashTable) blockJobs =3D virHashNew(g_free); =20 cmd =3D qemuMonitorJSONMakeCommand("query-block-jobs", NULL); if (!cmd) return NULL; if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - goto cleanup; + return NULL; =20 if ((data =3D virJSONValueObjectGetArray(reply, "return")) =3D=3D NULL= ) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("reply was missing return data")); - goto cleanup; + return NULL; } =20 nr_results =3D virJSONValueArraySize(data); - blockJobs =3D virHashNew(g_free); =20 for (i =3D 0; i < nr_results; i++) { virJSONValue *entry =3D virJSONValueArrayGet(data, i); if (!entry) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing array element")); - goto error; + return NULL; } if (qemuMonitorJSONParseBlockJobInfo(blockJobs, entry, rawjobname)= < 0) - goto error; + return NULL; } =20 - cleanup: return g_steal_pointer(&blockJobs); - - error: - return NULL; } =20 =20 --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 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=1626688625; cv=none; d=zohomail.com; s=zohoarc; b=nA0AJekVw2IAaXkw72yo5L4BWlr4RgvfGiXfbUIG1vyW+j2arx6IchnD0+o9N20ifHXioBw+nJQyY/TNg7ZSi9XRSnmjYJaJIZu6SP3e37I/g2X9fBbSPcOFyyfFtPYJKIHXKJjZANeyHh0RzO16nvZa9sc7A6f5p/YPd9PDod4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688625; 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=Ej53abq1XqXK37EUqvtgITAcplnjGBOt3YHzXYeCUGg=; b=BUtSihIjpFXne5H7yI9/VEGGVDYLrmR4qGbghGH8s9Dmt/A+2bq5b7O+jmrqzr55VzTOoOi7cPHsT+5MwbvNWuxv75bauvk1IeZyZSq0uxfkz+MoPFIxGNTb+cRNnAkKJfr9EFmTkjvpKkdUrNtVUv0iUM1ri6NZBO7A4HNwXhw= 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) 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 1626688625531251.401387944387; Mon, 19 Jul 2021 02:57:05 -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-446-e5EuGex5MH2C1ABB4EfpCQ-1; Mon, 19 Jul 2021 05:56:35 -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 971BC100C625; Mon, 19 Jul 2021 09:56:30 +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 7BB8818A50; Mon, 19 Jul 2021 09:56:30 +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 4748B4EA38; Mon, 19 Jul 2021 09:56:30 +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 16J9u7mx002628 for ; Mon, 19 Jul 2021 05:56:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id EBB3810074FD; Mon, 19 Jul 2021 09:56:07 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 415CE10074E1; Mon, 19 Jul 2021 09:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688624; 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=Ej53abq1XqXK37EUqvtgITAcplnjGBOt3YHzXYeCUGg=; b=HgqnAQZIN+QpnxhrXMlSxM1dkQyZP97l4tYDoNyFfLmUxJlI8uJw6G32ZE2i1xSgUFuGq0 ZH2BHSsXPNHeLys1FPw5jqPIGEzhS5Ts/3zVrMF0gHZvfzmgwT5D7gWW2LcfG63bvXcrqY 5jHTXUMY84KRC8hhTDrZbj6FjA4ovaE= X-MC-Unique: e5EuGex5MH2C1ABB4EfpCQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 08/10] testQemuGetLatestCaps: `virHashNew` cannot return NULL Date: Mon, 19 Jul 2021 11:55:52 +0200 Message-Id: <20210719095554.26137-9-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688626884100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/testutilsqemu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index be576037e2..72c0b1857b 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -585,12 +585,9 @@ testQemuGetLatestCaps(void) "s390x", "x86_64", }; - GHashTable *capslatest; + GHashTable *capslatest =3D virHashNew(g_free); size_t i; =20 - if (!(capslatest =3D virHashNew(g_free))) - goto error; - VIR_TEST_VERBOSE(""); =20 for (i =3D 0; i < G_N_ELEMENTS(archs); ++i) { --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 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=1626688725; cv=none; d=zohomail.com; s=zohoarc; b=Al//QW1PYnuKwUt2Th5V3RUhbXbIeCUVRXsTLG3Fq8XK/BfGoySp2We31V/ZSeJlQ9WdmXtyAqMFT3ibnOipKm0+e2kqUYGyoKZUnWxYjjSz9iSmf7xeizbB6mFuWd2o0SMjfcvZbNsMS7dhzM1JLvFVn5JzjBRf4qh8jDkLoU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688725; 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=CxKLxwmy4CV3cYNvWkQybIFNOnqx9dqluG7Pt3zusbk=; b=ANVlpBORredSciqe/uQh7nNKVCVGgaVr4jVkaGuoQVOX0vkr9D9T9FbL6qgABGdGNtBzs6yJXdsypXQG1DD2NWLarGd9aNt1UWnPcPHLIUo+qnCqAB1rPXbBPNELEaaoADGZjIrt+9rj1j8FL21qM0LBQ/5Hs5/o6ZdnZN71VH0= 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) 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 1626688725686637.6088030710644; Mon, 19 Jul 2021 02:58:45 -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-287-dTXqFiJJMoGtDQIrirN2ig-1; Mon, 19 Jul 2021 05:58:43 -0400 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 CC30C362FA; Mon, 19 Jul 2021 09:58:37 +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 AD63F5C261; Mon, 19 Jul 2021 09:58:37 +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 7BD514EA37; Mon, 19 Jul 2021 09:58:37 +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 16J9u9gn002634 for ; Mon, 19 Jul 2021 05:56:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 00E6010074FD; Mon, 19 Jul 2021 09:56:09 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4ACA710016F2; Mon, 19 Jul 2021 09:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688724; 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=CxKLxwmy4CV3cYNvWkQybIFNOnqx9dqluG7Pt3zusbk=; b=Orn49bSDJSEHkw/EzLCkkXcR7xGiKdtnPEOMl6u95S/eTBDyRfMw/6p2xdrsQFdH7qVaxA uYSbXULCClGbAT1cg/raOqFUBRwdGErOhMGtAMswSA9qW5nVZBydJWjjruxHS42rvW4MjB i2AE1cn5NGQeKKfRCskIWHKQkBQtA7M= X-MC-Unique: dTXqFiJJMoGtDQIrirN2ig-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 09/10] testQemuGetLatestCaps: Use automatic memory management Date: Mon, 19 Jul 2021 11:55:53 +0200 Message-Id: <20210719095554.26137-10-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688727668100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/testutilsqemu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 72c0b1857b..72b53096d9 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -585,7 +585,7 @@ testQemuGetLatestCaps(void) "s390x", "x86_64", }; - GHashTable *capslatest =3D virHashNew(g_free); + g_autoptr(GHashTable) capslatest =3D virHashNew(g_free); size_t i; =20 VIR_TEST_VERBOSE(""); @@ -601,10 +601,9 @@ testQemuGetLatestCaps(void) =20 VIR_TEST_VERBOSE(""); =20 - return capslatest; + return g_steal_pointer(&capslatest); =20 error: - virHashFree(capslatest); return NULL; } =20 --=20 2.31.1 From nobody Wed May 1 08:57:00 2024 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=1626688600; cv=none; d=zohomail.com; s=zohoarc; b=Fojhy2FiOvvfrLCnePVSN8AKMEqS1ek2uW91EG4hMfitoiX0L7Qasygjme/Rpcgrj7NVIdfwX4URPhUnui+SEglu1wuLNRg3bDYntKxMx8nk7Xal4hBpr3AukF9JSQBQeSfCInLo9ztjpjaSv3A2/P2GtxETsOcYNKTDXhnvfLo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626688600; 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=aR1366k4mTfqVRqWA/mvZKk7X+IGKmwJA9ZD1IBv5O8=; b=l7nLvVEhQY8NqZU8ibdc1dnn4CUV0b2Urxj+spK4E46JipTjsgWi5Mj/LiDJf+8uwUmwPMG1JMzUfaPLM3jNtwFxWtWXfKaQ5JXlQrXt3ZMTFCI/f8G3S30eC2R/wIOdZNrzV6HK5ulAD8e7KYVkvNAq7JhlmCCkMjNUoOiXcsI= 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) 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 1626688600801614.2662810878802; Mon, 19 Jul 2021 02:56:40 -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-591-rh8qOS7mPFaswlolkEBHsw-1; Mon, 19 Jul 2021 05:56:38 -0400 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 3F32F2F7DE; Mon, 19 Jul 2021 09:56:33 +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 1E98B5C23A; Mon, 19 Jul 2021 09:56:33 +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 DF83A4EA43; Mon, 19 Jul 2021 09:56:32 +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 16J9uA7s002646 for ; Mon, 19 Jul 2021 05:56:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0A55110074FD; Mon, 19 Jul 2021 09:56:10 +0000 (UTC) Received: from work.redhat.com (ovpn-113-143.ams2.redhat.com [10.36.113.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5389F10074E1; Mon, 19 Jul 2021 09:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626688599; 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=aR1366k4mTfqVRqWA/mvZKk7X+IGKmwJA9ZD1IBv5O8=; b=C1waUwLkM/CRVbgjp7Py3JCs40z3YUN3jL474/bpCnMwKpZgECJIRnI+GJsy27oZJCZFDr J4uPjNlvP89lRHPRQwNP0BzkC3eBfCtnBUERQPcq/3NhlSmFmkJ6KaqRWmm0LUKppzYm1a Ca038dcQr9MO+3fT25bV8VSY1QTM9kY= X-MC-Unique: rh8qOS7mPFaswlolkEBHsw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 10/10] testQemuGetLatestCaps: Remove superfluous `goto`s Date: Mon, 19 Jul 2021 11:55:54 +0200 Message-Id: <20210719095554.26137-11-twiederh@redhat.com> In-Reply-To: <20210719095554.26137-1-twiederh@redhat.com> References: <20210719095554.26137-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626688601247100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/testutilsqemu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 72b53096d9..fab676c070 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -594,7 +594,7 @@ testQemuGetLatestCaps(void) char *cap =3D testQemuGetLatestCapsForArch(archs[i], "xml"); =20 if (!cap || virHashAddEntry(capslatest, archs[i], cap) < 0) - goto error; + return NULL; =20 VIR_TEST_VERBOSE("latest caps for %s: %s", archs[i], cap); } @@ -602,9 +602,6 @@ testQemuGetLatestCaps(void) VIR_TEST_VERBOSE(""); =20 return g_steal_pointer(&capslatest); - - error: - return NULL; } =20 =20 --=20 2.31.1