From nobody Sun May 5 17:23:51 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=1625499445; cv=none; d=zohomail.com; s=zohoarc; b=KakXNC71PxE+NtJ/wVEa+A2/o9ZDi4gcSJzEveHSJ8k7e2UpvfTXSyJwT9Xm9BR2+4tiQY9Lu6FKmdKI3KvBga16+aZlrixXtiMp86XJoP2QI27skOa9kA0qr9Sdetymxn83ZGE6MtQWCAnqOOPYx4HmElyimGBiNZqi69shjvs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499445; 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=RdgqOhN1VbMO//o6af/WNhDK3creY/FR7rXM1wq8HQw=; b=NlcEv1copUA9Tce93IF7+7BoiVp/4RLOs8on058xxXwAR7I/1jTmYXaWxP8RP5QYyu2DBlKqpfFiFf2nghjpgPUF5hbZIuOZf3mRwqVSluBNEgEUUfqyyh9DB01jPZOIDoepe7R77l1H1SPuXYqmU+/fUOdLVv9qvdKuriqdf68= 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 1625499445536233.72378275592553; Mon, 5 Jul 2021 08:37: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-377-_p-J_GhxOzitDJwEVRb3vw-1; Mon, 05 Jul 2021 11:37:23 -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 9D86A1023F41; Mon, 5 Jul 2021 15:37: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 7EEA360CA0; Mon, 5 Jul 2021 15:37: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 49AA54EA37; Mon, 5 Jul 2021 15:37:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Fas3I032522 for ; Mon, 5 Jul 2021 11:36:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 252C82EB1A; Mon, 5 Jul 2021 15:36:54 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7122C2EB07; Mon, 5 Jul 2021 15:36:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499444; 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=RdgqOhN1VbMO//o6af/WNhDK3creY/FR7rXM1wq8HQw=; b=ETMc5ZN8BlZ91WJ3dsNWNyQga3BXpIN5Eq+Q8+FJnAnWte0LSxYmvyGggkPCzR72X9i7Nz UEsZ3k/euzSYRB7OrPEt6Y6zOeaTudrPPITBBEnmW0uRfP4KW4g0bciiA+kdZa+KGBN00p 9l2824bCVniVYBE/xVdAWa9CTBhCjNI= X-MC-Unique: _p-J_GhxOzitDJwEVRb3vw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 01/10] qemuMonitorGetAllBlockStatsInfo: Clean up line break Date: Mon, 5 Jul 2021 17:36:40 +0200 Message-Id: <20210705153649.236145-2-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: 1625499451919100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- 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 8f35b4240f..df1e41f68f 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2162,8 +2162,7 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, if (!(*ret_stats =3D virHashNew(g_free))) goto error; =20 - ret =3D qemuMonitorJSONGetAllBlockStatsInfo(mon, *ret_stats, - backingChain); + ret =3D qemuMonitorJSONGetAllBlockStatsInfo(mon, *ret_stats, backingCh= ain); =20 if (ret < 0) goto error; --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499429; cv=none; d=zohomail.com; s=zohoarc; b=M5YTUD7YrC/IXLCy3qkM3+ozUFgqK8LLk9B8YVtwYT6ntpT96KCpp8aklrVET1Dx5ortBUjlqqdv03tNfll9LqBc77U0oOCn6YMtfm5AAJ71eFWjTLmpJzsEvbubspPzUvAOeAGuaxOOIEKWy0JgeJlarCd+/F+bD8xOREiR10Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499429; 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=rPttV5cbrkzRAZxzSLN8DY0p0JWyVtjBAuOGZ5vgBcQ=; b=GnMpDfEUkyJfwIhYI5O1U6u4tMOj/iPmaYFdw9LgETQlweMhJIitEy0Y2RvpRCIsKxxTHh3G8rsw8JpUcs3iU6uwFzM71NLLE+ERr+W4rjAJCDLDlG09Ku5xomCGV6MVhVFHCcDwGRIdi6dYT/aOGShcezmg7oUh+L2wr+RD5/A= 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 1625499429604432.6692251113948; Mon, 5 Jul 2021 08:37:09 -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-25-1kLUEz2aMSyFok_PKNg3nA-1; Mon, 05 Jul 2021 11:37:07 -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 7211218A0728; Mon, 5 Jul 2021 15:37:01 +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 26EEC60C81; Mon, 5 Jul 2021 15:37:01 +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 BD5024EA29; Mon, 5 Jul 2021 15:36:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Fatqj032537 for ; Mon, 5 Jul 2021 11:36:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2CE852EB18; Mon, 5 Jul 2021 15:36:55 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 774B92EB07; Mon, 5 Jul 2021 15:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499428; 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=rPttV5cbrkzRAZxzSLN8DY0p0JWyVtjBAuOGZ5vgBcQ=; b=GnafoUnUVr367Gn0FhqHwhZ4A5x7Fo1VYdYAU+xhOLm9dXGvQjCdHHhQWQhNspKRFwNM81 KuvDLF8K8tGAOtOCazDJT9hNsYARZwSeLyHcWRFfWA4PjISR0uDmosrWbIj1deLcVQf3Sz 2EbETQIIKel4J8x7+2yGYBxDlgjsrn8= X-MC-Unique: 1kLUEz2aMSyFok_PKNg3nA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 02/10] qemuMonitorGetAllBlockStatsInfo: Remove superfluous variable initialization Date: Mon, 5 Jul 2021 17:36:41 +0200 Message-Id: <20210705153649.236145-3-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: 1625499433236100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index df1e41f68f..19fcc5658b 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2154,7 +2154,7 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable **ret_stats, bool backingChain) { - int ret =3D -1; + int ret; VIR_DEBUG("ret_stats=3D%p, backing=3D%d", ret_stats, backingChain); =20 QEMU_CHECK_MONITOR(mon); --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499429; cv=none; d=zohomail.com; s=zohoarc; b=eUDeXSSrqmBq05YsqIAz0I7FKu9zOM1RYPFBcIDn4qc3sVCAnCFRvdM8tLDlNVPAbsm6wGtsCOUXNOAROcLtGx1knbdSjrrcEkFr1f9EnYmf8YcJ/20jMgm6NsTilrQ8Bs49oNweGGRAqeH9wi1pngu+05Ih0lOZDVJW231EtJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499429; 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=KEchEAiPeN5fPjdlkLXu0B1y1IINykogYmljtBQxNlI=; b=R1z4sCykZpx6Vbc/rdsjeO0eFab+hG7h4Z6LCcm1yjRoN3IiFyDBdqznqejqKnh9JrCZ2kt/LfsgW2R9Xw2poSOkWTRYldcQi6MSR3QONt7uNUED9aj/jCsmLiWJEUcR+LkCKEkGjmtUfRB6Zrz3Y3r7jjypLAnLLd2smuqSMhc= 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 16254994298301018.7935900715606; Mon, 5 Jul 2021 08:37:09 -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-528-aU3IMcO9PnKapaCH_BDwwQ-1; Mon, 05 Jul 2021 11:37:06 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9A6D9802922; Mon, 5 Jul 2021 15:37:01 +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 16C6410074F8; Mon, 5 Jul 2021 15:37:01 +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 82ACA1809C9A; Mon, 5 Jul 2021 15:36:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Fauer032549 for ; Mon, 5 Jul 2021 11:36:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 504F12EB11; Mon, 5 Jul 2021 15:36:56 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8773A2EB07; Mon, 5 Jul 2021 15:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499428; 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=KEchEAiPeN5fPjdlkLXu0B1y1IINykogYmljtBQxNlI=; b=ENuKreI/KezxDmjN2cu8XJRivzUIN+LETS4kFk7SmR6baFygz8zX4hk06dCR2SOrtIFU83 D4cxZ8CIJxk0ryz8rTMKc/N2LtBQBpLn1FcXEaRD+4NdWsImfwL5jCC9xW5UW6q1vqXBtS G04OPmamYD24jVk9e35ulWAfuidOgKE= X-MC-Unique: aU3IMcO9PnKapaCH_BDwwQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 03/10] qemuMonitorGetAllBlockStatsInfo: Assign hash table only on success Date: Mon, 5 Jul 2021 17:36:42 +0200 Message-Id: <20210705153649.236145-4-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.84 on 10.5.11.22 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: 1625499436004100002 Content-Type: text/plain; charset="utf-8" `virHashNew` cannot return NULL, the check is not needed. Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 19fcc5658b..86aabc98c3 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2155,23 +2155,23 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, bool backingChain) { int ret; + GHashTable *stats =3D virHashNew(g_free); + VIR_DEBUG("ret_stats=3D%p, backing=3D%d", ret_stats, backingChain); =20 QEMU_CHECK_MONITOR(mon); =20 - if (!(*ret_stats =3D virHashNew(g_free))) - goto error; - - ret =3D qemuMonitorJSONGetAllBlockStatsInfo(mon, *ret_stats, backingCh= ain); + *ret_stats =3D NULL; + ret =3D qemuMonitorJSONGetAllBlockStatsInfo(mon, stats, backingChain); =20 if (ret < 0) goto error; =20 + *ret_stats =3D stats; return ret; =20 error: - virHashFree(*ret_stats); - *ret_stats =3D NULL; + virHashFree(stats); return -1; } =20 --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499447; cv=none; d=zohomail.com; s=zohoarc; b=K4Ovi98soTq5H0WVSeHX2oiUfJ1K2to5DXjEUllec8DSlZkfs6/7qFVuxNluyJA9E0gSljD6qEM9JXEGx8HZj6+bWGRpbiNxkPRPlXY+PWh3wiN2i4TnJpV2Lp5ZmFAve922APei4/y8TMPddWgUg45oBW/Qx0yls3AScYNVADI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499447; 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=yNRw3irPwCJqncqsn3a7256TeT8vQmRVSXKjHI3tgTc=; b=KsVduf1zn/uE+puxLJI7RW19AC9IXo/VZsJIzn4EkZkr8qFhBR1PoVsYQ62nRnWBpA1c9ttYuGtC6+KNT40+6+qtPoSG8gRi2sXvkBB+wnp9nex0QIH/gxFVwm5I/2vSIiprvUp+9NmzGEZ7rMSJvlB0gI1RhybFBQeGwervmqA= 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 1625499447687257.3651573667172; Mon, 5 Jul 2021 08:37:27 -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-504-Xifz73qwOxqh2vfc5YkMLQ-1; Mon, 05 Jul 2021 11:37: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 9E44518A072B; Mon, 5 Jul 2021 15:37:18 +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 7E5AC5C1D0; Mon, 5 Jul 2021 15:37:18 +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 4095D4EA3A; Mon, 5 Jul 2021 15:37:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165FavjJ032554 for ; Mon, 5 Jul 2021 11:36:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 554E32EB0F; Mon, 5 Jul 2021 15:36:57 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id A22C62EB07; Mon, 5 Jul 2021 15:36:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499446; 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=yNRw3irPwCJqncqsn3a7256TeT8vQmRVSXKjHI3tgTc=; b=EZqcpxoeVb5n1c1F3S6633dKK9JhhWpTQu2mhvH6vFqvHd4dYq/eBhY15UCLT6kC0X2Uqk ac+jWfMjagQmQdv4Xn+L0L15f290suVA4dTwSBceNHPIBChABS1nG4XGhombCQbfCExL8W emw//6gcOsjbNq95/KdeSF0N40XcmQg= X-MC-Unique: Xifz73qwOxqh2vfc5YkMLQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 04/10] qemuMonitorGetAllBlockStatsInfo: Use automatic memory management Date: Mon, 5 Jul 2021 17:36:43 +0200 Message-Id: <20210705153649.236145-5-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: 1625499451920100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 86aabc98c3..f08b43bbfb 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2155,7 +2155,7 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, bool backingChain) { int ret; - GHashTable *stats =3D virHashNew(g_free); + g_autoptr(GHashTable) stats =3D virHashNew(g_free); =20 VIR_DEBUG("ret_stats=3D%p, backing=3D%d", ret_stats, backingChain); =20 @@ -2165,14 +2165,10 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, ret =3D qemuMonitorJSONGetAllBlockStatsInfo(mon, stats, backingChain); =20 if (ret < 0) - goto error; + return -1; =20 - *ret_stats =3D stats; + *ret_stats =3D g_steal_pointer(&stats); return ret; - - error: - virHashFree(stats); - return -1; } =20 =20 --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499486; cv=none; d=zohomail.com; s=zohoarc; b=FHy4NsWX+lo3O/xpKPCYOBsVGBljYir1A1N7FuMnFXi7W99hHbXB+l3pYepOn7tkE0que9iEtzT3fm8nHHnS7KbFu0m8relicdjKowlY5VITHSI+lqMZUNoxYWk7tgDLpyqCV/Vbm+U7sdxc7biUI+vGKD+FAVrcGei3N7xUR48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499486; 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=B+L4qYWU7dT6ZxDuqqoNkvNyS4vRnY15xBQ4QM4uCV0=; b=UeYe5T/3NXqA0QK/HTCPZoDwXR0r3mmimsa58lr8QLiu5oX9uulIAlgKQkGYgP1iu6eZdQ0m0bkUBH5DD7WdRlKKp2duf9tClh6POfRB4P8JZb4XHADoqanIYwfhgRbejNLodiSgnZ/C/dpeLvRWVd48tlETGb2N/Sehqo86GM0= 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 1625499486232230.1343062867454; Mon, 5 Jul 2021 08:38:06 -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-94-xQtr7iYsNQqSxmFVTihH3g-1; Mon, 05 Jul 2021 11:37:25 -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 1B303362FB; Mon, 5 Jul 2021 15:37: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 B71B86267C; Mon, 5 Jul 2021 15:37:19 +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 72A761809CB4; Mon, 5 Jul 2021 15:37:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Faw2P032562 for ; Mon, 5 Jul 2021 11:36:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5BF592EB0F; Mon, 5 Jul 2021 15:36:58 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7B882EB13; Mon, 5 Jul 2021 15:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499485; 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=B+L4qYWU7dT6ZxDuqqoNkvNyS4vRnY15xBQ4QM4uCV0=; b=UPsjuM3rEaIhEmZI/+8+7Gv+zmV6qwDBYO0RUvFdIPNTJzSZvaCp5JnHFFsQRwYo4P4aZL SPfjQWniJD1E+s9LVKVohwVLQFrnwtzge0WBnEqpw0m6aRDCuoipTgmTkBGke7jyk+x+9+ 2xvBEQdl1wzlA2W3SoZTguSJOWvz+XI= X-MC-Unique: xQtr7iYsNQqSxmFVTihH3g-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 05/10] qemuMonitorGetBlockInfo: Remove superfluous variable "ret" Date: Mon, 5 Jul 2021 17:36:44 +0200 Message-Id: <20210705153649.236145-6-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: 1625499490104100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- 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 f08b43bbfb..de0f6ccf7d 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2103,7 +2103,6 @@ qemuDomainDiskInfoFree(void *value) GHashTable * qemuMonitorGetBlockInfo(qemuMonitor *mon) { - int ret; GHashTable *table; =20 QEMU_CHECK_MONITOR_NULL(mon); @@ -2111,9 +2110,7 @@ qemuMonitorGetBlockInfo(qemuMonitor *mon) if (!(table =3D virHashNew(qemuDomainDiskInfoFree))) return NULL; =20 - ret =3D qemuMonitorJSONGetBlockInfo(mon, table); - - if (ret < 0) { + if (qemuMonitorJSONGetBlockInfo(mon, table) < 0) { virHashFree(table); return NULL; } --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499452; cv=none; d=zohomail.com; s=zohoarc; b=R+iR9pwgkXsEWIngnEeboZUET6sE23Szchi5kpjLV8qp2dOQtc3rx3VVxWtwNcGOnOfPthqhVc+3EaIbLSnkXgFR82J/+mYohuS/M6ocuZL2L50cVPNgk0Myxnyahh2ZRkq3kpnuAMouDQuevN+233/6i/P21J9BaNQp5vcMVZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499452; 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=YAL/1j/9CoyoBmO3y58tJfTtfNeuDVA2pkicjPm9+eQ=; b=aEWmqlJ8c4QcMe8Zi2Gpgr4IbsygD0q3uMTT3FSzgy+f7opv4KXY4/LVA6wLJ7+67jjYAdLi4mLlh4mcFXjOYZ3uTM+nmil0v4PvB7tJCEhBircGKV+7dN//29sHuoSRkFnbF8NLfw/NE/cYPHpu1uWpUo6aDim9nEQrxVItA9c= 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 1625499452670512.6906883300148; Mon, 5 Jul 2021 08:37: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-133-iZf2DkQ1MtmVImfYF3bm8Q-1; Mon, 05 Jul 2021 11:37:29 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC870100C620; Mon, 5 Jul 2021 15:37:21 +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 8CF285D9DC; Mon, 5 Jul 2021 15:37:21 +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 5609318005A2; Mon, 5 Jul 2021 15:37:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165FaxFn032579 for ; Mon, 5 Jul 2021 11:36:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6713B2EB07; Mon, 5 Jul 2021 15:36:59 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF68EF6DA; Mon, 5 Jul 2021 15:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499451; 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=YAL/1j/9CoyoBmO3y58tJfTtfNeuDVA2pkicjPm9+eQ=; b=RDbxyU12gNMd5PMbidtFe9NsVHZ1jSuNp7TxocWLoieuWNDTzxIhGLY+gXjNV+a4dPIO6D sCogbTv8WGh7jShoxiJdLvq7cLlEBwu+0bpVP7MrUs0HHFg8NITfxCuiGmC4+FT2iqKDlb IAvGgxkUws3mEO1u0YrM1L4LSB/UGM8= X-MC-Unique: iZf2DkQ1MtmVImfYF3bm8Q-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 06/10] qemuMonitorGetBlockInfo: Use automatic memory management Date: Mon, 5 Jul 2021 17:36:45 +0200 Message-Id: <20210705153649.236145-7-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.14 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: 1625499457950100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index de0f6ccf7d..9f0b20db09 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2103,7 +2103,7 @@ qemuDomainDiskInfoFree(void *value) GHashTable * qemuMonitorGetBlockInfo(qemuMonitor *mon) { - GHashTable *table; + g_autoptr(GHashTable) table =3D NULL; =20 QEMU_CHECK_MONITOR_NULL(mon); =20 @@ -2111,11 +2111,10 @@ qemuMonitorGetBlockInfo(qemuMonitor *mon) return NULL; =20 if (qemuMonitorJSONGetBlockInfo(mon, table) < 0) { - virHashFree(table); return NULL; } =20 - return table; + return g_steal_pointer(&table); } =20 =20 --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499451; cv=none; d=zohomail.com; s=zohoarc; b=AYtrwMdAansGzhT1UO1L8gsHEPaaZvI5ulIll+ck95yjqo2rylwWw5ws2UkM5+dgnlLaz+UfvjxUK+8PR2N3PHrEA62zl0DrpG6ermoOUF2S70Y0+KSfoUXpJpvU2aAfu1Lp5nx6uwaGbRZvOIJbR9U2mD1ZtwqJFLcRGYM0gn4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499451; 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=y0pmR6Qf6VNHlFL+vgr2zR/ZzYTKVLwv4V/ac+9Tvtk=; b=EMzhQC3CRlQFJRjjYlQLTAN9CK4JH4L+0iY2e6fkaEFfZsjK8JzvPM5yqJa9F/61KyvFvBIp/OhXQkeqVwFT1/TtSVYx4uCLYgbf+RWOGe1JL138QX55orNs7OhfPEqXx+UK5GP4OygjVSiAddODVtK8QXCa/3OgT89F/JjZB5g= 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 1625499451236999.1013227498038; Mon, 5 Jul 2021 08:37:31 -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-320-F3afe5rFM2W4-t0EAp16SA-1; Mon, 05 Jul 2021 11:37:28 -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 0B55B10C1ADC; Mon, 5 Jul 2021 15:37: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 E451760CA0; Mon, 5 Jul 2021 15:37:22 +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 B06A64EA3B; Mon, 5 Jul 2021 15:37:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165Fb6OC032595 for ; Mon, 5 Jul 2021 11:37:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 52C9F2EB15; Mon, 5 Jul 2021 15:37:06 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 56F2A2EB13; Mon, 5 Jul 2021 15:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499450; 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=y0pmR6Qf6VNHlFL+vgr2zR/ZzYTKVLwv4V/ac+9Tvtk=; b=QHzm2rUR9WbnaeiVq/WVMKtUGrqwuU2R7YbccTkH/jRVVUDecOn+kCM7u79JLOdNpPH70Y Lri1YQWdtjG05msNtrKk2aUdrO7gO0KdWQTVYqB6pFr16eDMNneQMrfaVGgyF6QH4HHfjF ZV4rwsxPV/MegAW3BAHC4dInceFJMug= X-MC-Unique: F3afe5rFM2W4-t0EAp16SA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 07/10] qemuMonitorGetBlockInfo: `virHashNew` cannot return NULL Date: Mon, 5 Jul 2021 17:36:46 +0200 Message-Id: <20210705153649.236145-8-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: 1625499455062100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- 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 9f0b20db09..dba2fb1982 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2103,13 +2103,10 @@ qemuDomainDiskInfoFree(void *value) GHashTable * qemuMonitorGetBlockInfo(qemuMonitor *mon) { - g_autoptr(GHashTable) table =3D NULL; + g_autoptr(GHashTable) table =3D virHashNew(qemuDomainDiskInfoFree); =20 QEMU_CHECK_MONITOR_NULL(mon); =20 - if (!(table =3D virHashNew(qemuDomainDiskInfoFree))) - return NULL; - if (qemuMonitorJSONGetBlockInfo(mon, table) < 0) { return NULL; } --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499448; cv=none; d=zohomail.com; s=zohoarc; b=IIQRgMJOfNoow0lUQFd/K55IvaB8n2SJo+uUO+ZJbX/8/qDbaItJlc5Z8yluIBmgmVs/1V8ODawnJNjxOpudZq9dGwbCVn5oK4euSCGAcJ+syzR0fSM5RLM27llANI40j1hVwM0ZDuy9NldvQPvQ/U3tZ4nvUvlgMjQuD0xCYfo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499448; 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=H3C4PiiLa1H+l9OBc7M/w64fZYtIVzzUklXFvNKcViI=; b=IT6jpYULLrw/OaDUuopJGbInGFlKVpHI87BkBhhsBI1nxEyEteNp8iYkW5zyCEJe8q6AMP+S9r7V5Qv0bsPSAjTPgToQ/bw54GfUq5huzez7E6XamYD3SDMSuDLY7Kl3AyI3jkBSJ03YACCdimuMBaxN6pn6anb153/N8lch8HI= 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 1625499448285290.4347438855357; Mon, 5 Jul 2021 08:37: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-424-2i-TjlR9MMK960ULz1-XsA-1; Mon, 05 Jul 2021 11:37:25 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CB8CA804301; Mon, 5 Jul 2021 15:37: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 A3A4F10074F8; Mon, 5 Jul 2021 15:37: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 683871809CB6; Mon, 5 Jul 2021 15:37:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165FbF3K032609 for ; Mon, 5 Jul 2021 11:37:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id C62DF2EB07; Mon, 5 Jul 2021 15:37:15 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 060132EB1B; Mon, 5 Jul 2021 15:37:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499447; 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=H3C4PiiLa1H+l9OBc7M/w64fZYtIVzzUklXFvNKcViI=; b=Phnxj44o59yagL5alKdEHdv0SJv2CKyO/DQLkKipdEf7XxLEUTh2LMuibNyPtZNb6XuqS0 vtgaKyTBMGIyYBNrxjL3oy444lrbG0UwkcvVI9lCcqnW+lHxkM2LkYAZO7LF6ai0eePlNY PbRdKt15G89exs4xY6q3UT64X7LJV/I= X-MC-Unique: 2i-TjlR9MMK960ULz1-XsA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 08/10] qemuMonitorGetChardevInfo: Remove superfluous variable "ret" Date: Mon, 5 Jul 2021 17:36:47 +0200 Message-Id: <20210705153649.236145-9-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.84 on 10.5.11.22 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: 1625499451915100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- 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 dba2fb1982..f03d6106f9 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2885,7 +2885,6 @@ int qemuMonitorGetChardevInfo(qemuMonitor *mon, GHashTable **retinfo) { - int ret; GHashTable *info =3D NULL; =20 VIR_DEBUG("retinfo=3D%p", retinfo); @@ -2895,9 +2894,7 @@ qemuMonitorGetChardevInfo(qemuMonitor *mon, if (!(info =3D virHashNew(qemuMonitorChardevInfoFree))) goto error; =20 - ret =3D qemuMonitorJSONGetChardevInfo(mon, info); - - if (ret < 0) + if (qemuMonitorJSONGetChardevInfo(mon, info) < 0) goto error; =20 *retinfo =3D info; --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499489; cv=none; d=zohomail.com; s=zohoarc; b=YpTbFlsJzA9bRCaf1OahLGl4I4yhkhQpNGsN28mDtS1JS0cp/I6pMAa5Iw9N+o3DPOfqANI+cG7r28Cc1m22bJQIcgA3OLdRjkMhqvAm7cCKodkJ+jlsg0+BNa782sh7wkUH04sM/5gEyFvc68rM1ed4OsR2F7L83G/npVAbTiI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499489; 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=pQfa/tXRi7rKOcjc+Je1+ocF908QSHvGTAG0+NXs8YM=; b=S73TbbReprNRaP9e5+yVITc75IoR4V/vRhfQnW7EqMboVfkllBOmaqHpD/h9IrBzUSiGn6UhZJevINO6o1voTCEqO43fsSd0tLSbFlE9pV9YckTK9WH4wZceq3QgIejT1EG8AbqT8kpUSDBHF105pHx4NfTtgZmnJs4KcNk9bG4= 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 1625499489267634.30951076887; Mon, 5 Jul 2021 08:38:09 -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-347-6Kf1y6TdOtClqyYkyVDNfg-1; Mon, 05 Jul 2021 11:37:32 -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 8E655362FE; Mon, 5 Jul 2021 15:37: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 65C962EB07; Mon, 5 Jul 2021 15:37: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 322274EA3E; Mon, 5 Jul 2021 15:37:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165FbKhD032681 for ; Mon, 5 Jul 2021 11:37:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0EE2B2EB07; Mon, 5 Jul 2021 15:37:20 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DDB02EB1A; Mon, 5 Jul 2021 15:37:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499488; 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=pQfa/tXRi7rKOcjc+Je1+ocF908QSHvGTAG0+NXs8YM=; b=hnrskITpCoPvVQLWzHRYSwDrcdIt64jzICKavNj9WVCEFUAu9QZ7apBR2Jyk3/bihwFVNN Aqbd7YY8Ek+bEti/GYj1Sx6Pgzurgd28Tfa2rPMo9kCv7z/t4Ihsf8D3L2diwXufGVo3La oJ7EaX7s3+/PcsfcfNlLk0mTgWOp4mQ= X-MC-Unique: 6Kf1y6TdOtClqyYkyVDNfg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 09/10] qemuMonitorGetChardevInfo: Use automatic memory management Date: Mon, 5 Jul 2021 17:36:48 +0200 Message-Id: <20210705153649.236145-10-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1625499493170100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index f03d6106f9..2c43cc0788 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2885,25 +2885,21 @@ int qemuMonitorGetChardevInfo(qemuMonitor *mon, GHashTable **retinfo) { - GHashTable *info =3D NULL; + g_autoptr(GHashTable) info =3D NULL; =20 VIR_DEBUG("retinfo=3D%p", retinfo); =20 - QEMU_CHECK_MONITOR_GOTO(mon, error); + QEMU_CHECK_MONITOR(mon); =20 + *retinfo =3D NULL; if (!(info =3D virHashNew(qemuMonitorChardevInfoFree))) - goto error; + return -1; =20 if (qemuMonitorJSONGetChardevInfo(mon, info) < 0) - goto error; + return -1; =20 - *retinfo =3D info; + *retinfo =3D g_steal_pointer(&info); return 0; - - error: - virHashFree(info); - *retinfo =3D NULL; - return -1; } =20 =20 --=20 2.31.1 From nobody Sun May 5 17:23:51 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=1625499455; cv=none; d=zohomail.com; s=zohoarc; b=cPl4eCbZeJLtz3R9DWIi/zMX4G0AXzfK6HrI/b+OqEqU0phx2zjfJRDSFoEpCysTBdSuS8sTk0WgOBHEV9xvSzFeOTOnRlT0L4wloObT5AyG3Jk0KENRMdnKb5Fjnqhrt5m2YYbEJLhWQkY0wei0nN8Iq3HzlAf4TLNCExPRiS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625499455; 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=FN0LuwHhxIQrl0NcYVPcfbvKaLp+418pAsP7Z1fztf8=; b=hxaFKZ+YPcIJ66iqjL0MwiKfXrnugdeR9Mc3hhCEpEYeix9UQFB6raU6B5/U173I7/Riz+jGvXKkHq+N22Ogqb6NnzcaGe2rSgRBKuPURmek3pwm1hYgOscZ6RiKKCQrE9i3bPPPEzP9aYH/SecZwX3W0zpRTQtXaXs3ZItwg/Y= 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 1625499455421486.54218581575856; Mon, 5 Jul 2021 08:37: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-6-Hfc4zbV8PfCfYWZeAqwpVw-1; Mon, 05 Jul 2021 11:37:32 -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 4BA661023F48; Mon, 5 Jul 2021 15:37: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 1C26B2EB15; Mon, 5 Jul 2021 15:37: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 D41C51801257; Mon, 5 Jul 2021 15:37:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 165FbLg4032692 for ; Mon, 5 Jul 2021 11:37:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 14ABA2EB1A; Mon, 5 Jul 2021 15:37:21 +0000 (UTC) Received: from work.speedport.ip (ovpn-113-101.ams2.redhat.com [10.36.113.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60CCC2EB07; Mon, 5 Jul 2021 15:37:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625499454; 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=FN0LuwHhxIQrl0NcYVPcfbvKaLp+418pAsP7Z1fztf8=; b=LJBF7M2oSfoGms2YFDgYqB4lwQISg4BZdpdYAlMmvZ8/36y+BLmF4LLdaiqGriIDZRigum zyBgenTT0IWwSmqEyysZaaqpURUVKbAa7OMHijR1+g0JKlg6bpsWHFCGXm5SRBXckTJk8f 3Yb3CV4Vsj5aHoLuIPaspJ3TmbYPhcA= X-MC-Unique: Hfc4zbV8PfCfYWZeAqwpVw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 10/10] qemuMonitorGetChardevInfo: `virHashNew` cannot return NULL Date: Mon, 5 Jul 2021 17:36:49 +0200 Message-Id: <20210705153649.236145-11-twiederh@redhat.com> In-Reply-To: <20210705153649.236145-1-twiederh@redhat.com> References: <20210705153649.236145-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.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 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1625499461026100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- 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 2c43cc0788..a63056f0a0 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2885,16 +2885,13 @@ int qemuMonitorGetChardevInfo(qemuMonitor *mon, GHashTable **retinfo) { - g_autoptr(GHashTable) info =3D NULL; + g_autoptr(GHashTable) info =3D virHashNew(qemuMonitorChardevInfoFree); =20 VIR_DEBUG("retinfo=3D%p", retinfo); =20 QEMU_CHECK_MONITOR(mon); =20 *retinfo =3D NULL; - if (!(info =3D virHashNew(qemuMonitorChardevInfoFree))) - return -1; - if (qemuMonitorJSONGetChardevInfo(mon, info) < 0) return -1; =20 --=20 2.31.1