From nobody Sun May 19 02:38:26 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=1662556459; cv=none; d=zohomail.com; s=zohoarc; b=NWzhnxGOwGaBEbUDiqKxUdAbTztbobk8FCUB55NUrg+ff7DJgIoEHJiq81hxGiAUsmbfRcySNnXaeD/XqWFIp7T9TglwrRDgAC9JoaDCZF45BJvIqX9QRsJ5jgBlCTlftisN57RWqaxVqFHC4BWNaThfRxv/2XKF2z3yhmSF18Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662556459; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=tZyazsSNeZCfxNnw/zYznfZkF/zOfa/DjLZMfYyssjg=; b=SN57NH2VCEkht6heIZOJeuBiretCtQ834f/i73+90Tc/rJnjgAdhZKmwsujzBDwUCIg+nyM8XW2X1xUEQ7e8phnrgL7Z8IUh569ld0UbB78uOM2/N74XeUDCrN+DSCnwm1gRNfKSUz33/KawYj5IEKqJSBmI8LL8Rsi4ph5E7Kw= 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 166255645972949.84921987628502; Wed, 7 Sep 2022 06:14:19 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-590-AajECS3SM-q5zAiuBrjrZw-1; Wed, 07 Sep 2022 09:14:12 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8CA6F1C20AE6; Wed, 7 Sep 2022 13:14:10 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 349EA1415137; Wed, 7 Sep 2022 13:14:10 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 043901946A48; Wed, 7 Sep 2022 13:14:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4718C1946A40 for ; Wed, 7 Sep 2022 13:14:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 178FE2026D64; Wed, 7 Sep 2022 13:14:09 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id B61522026D4C for ; Wed, 7 Sep 2022 13:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662556458; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tZyazsSNeZCfxNnw/zYznfZkF/zOfa/DjLZMfYyssjg=; b=KSZwnktC/98VTsaLqZXOa7Zu+96Z+f4Fx/HoedOPPc9d6bqGdZYPw4InxwFoun2sAkm6Ds iMVYV3rDWIoLBezg7q6emZTGc+Hc70z33X4EeWfp+U74iGaxDTV/Aq2tOt8EZc3AvjiaMM x35MtY4havhKl3m1M7e9/ZEWIKsJ7+s= X-MC-Unique: AajECS3SM-q5zAiuBrjrZw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH] qemu_monitor_json: remove unnecessary variable 'rc' Date: Wed, 7 Sep 2022 15:13:57 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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: 1662556461515100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Kristina Hanicova Reviewed-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor_json.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 70fba50e6c..5f7c1a8db9 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -8611,11 +8611,8 @@ qemuMonitorJSONQueryStats(qemuMonitor *mon, qemuMonitorQueryStatsProvider *provider =3D providers->pdata[i= ]; const char *type_str =3D qemuMonitorQueryStatsProviderTypeToSt= ring(provider->type); virBitmap *names =3D provider->names; - int rc; =20 - rc =3D virJSONValueObjectAppendString(provider_obj, "provider"= , type_str); - - if (rc < 0) + if (virJSONValueObjectAppendString(provider_obj, "provider", t= ype_str) < 0) return NULL; =20 if (!virBitmapIsAllClear(names)) { @@ -8629,9 +8626,7 @@ qemuMonitorJSONQueryStats(qemuMonitor *mon, return NULL; } =20 - rc =3D virJSONValueObjectAppend(provider_obj, "names", &pr= ovider_names); - - if (rc < 0) + if (virJSONValueObjectAppend(provider_obj, "names", &provi= der_names) < 0) return NULL; } =20 --=20 2.37.2