From nobody Sun Feb 8 14:51:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1571737023; cv=none; d=zoho.com; s=zohoarc; b=BlG24BOBPlGf0UV3trJXDgT5t+eMEywQLu7IRAGThV3iMSlIe5uglJ8TgUe4dyIowtGeSujVFVEpiMmeP+LIAJaEaGivbn05IXr+F+KNP8RYfhpiirAS+b2j6Epy0U7YDYTFxtkiKBDZhKloQi9wze7IKEqgp4F4o6websCMMUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571737023; 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=5rhoLMw7yFguYWEPpf30np3a97FgejzwqIjLYbWP5T4=; b=jdoXNnSdOK+cbI2iF488EnsM0a0MJjpYaRZWzHKnngT5HYUBJ6qdAzu1Y5i1cRcU3Ry75flxtr56q6NvWzhgyTnJklwd+yP562RdaYw4lNL/+X3tOPOQK0MC/xQNbq1rIk03Lua5pbw6lFmhSGj/krEzIKtTJzZOAbO6QUPoDV4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1571737023501829.811578448138; Tue, 22 Oct 2019 02:37:03 -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-102-PGtMjvkbPcmV4HPrgPMt0g-1; Tue, 22 Oct 2019 05:37:01 -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 A1DEF1005512; Tue, 22 Oct 2019 09:36:55 +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 73BA460657; Tue, 22 Oct 2019 09:36:55 +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 2151418184A4; Tue, 22 Oct 2019 09:36:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9LIJdgb000576 for ; Mon, 21 Oct 2019 14:19:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 84CF552FCF; Mon, 21 Oct 2019 18:19:38 +0000 (UTC) Received: from mx1.redhat.com (ext-mx24.extmail.prod.ext.phx2.redhat.com [10.5.110.65]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24CA15B69A for ; Mon, 21 Oct 2019 18:19:38 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EF62210CC1F0 for ; Mon, 21 Oct 2019 18:19:36 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id c21so22432097qtj.12 for ; Mon, 21 Oct 2019 11:19:36 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:7979:d16f:4e5e:8e8d:1141]) by smtp.gmail.com with ESMTPSA id d205sm9248741qke.96.2019.10.21.11.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 11:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571737022; 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=5rhoLMw7yFguYWEPpf30np3a97FgejzwqIjLYbWP5T4=; b=hb3OyufU47bBZOln5UnffPR/gps4NkIHYdqX+0+ewEpPz/oG/hY2UJMmB6jCtiBOwCkvNY VqmlDAf0IOm1REHrpFC+kYUPAHSjfFshpsnYRjOtHrwOTvdVXQreNx/gM53dErhGCDvMNG Ricj8AoyBwys5s6dcSIvJNiv2efilqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eDQ5vjDjTZ9Dhaz1iYf+KZtB7skmoZYb4V1IJkAxi3w=; b=hGqfoQW3YrN6THn7J4t8wtz4dgqhnfSX8B9rSwL5s0SLsTlUWXrLDwbBsL5w9wQtJr Eq0tYXNU+SeXPbe0e74VM3tBoF8uZaWHSz2dUmOVIMIviwVckV37N/ER2gnEK1dUa065 49X4iej7/DypYYv4x3xgDyaRQOcsvdU2jmW7BdKKSxzvWMdPFxe02Gfm2g8ObwgSqZQl rnVbVSKvyEg6CWOicfaZAYIgKfg4iZbMVtnXZIZ+Hbx7gb1/xmJqFZWn9A90WPjZmAL7 wwHkOFbroFBeaqwuaJp+bGaGCLF+hzk0DWqlZ2N2zj4HMPH1Lv7UIuXnepxFKo3CMXba 0FMw== X-Gm-Message-State: APjAAAVnoJUSQzOsBUhjCZJyc5hY6jgYjuZrEMCc05pFIqbnsfVr7/lW 0lrhRcnlhvvshTVOSIMCbrAmHmYOLsk= X-Google-Smtp-Source: APXvYqwHQJIrgI7ugE8AbaVPqL0pZ1vu6E7dW0bipXtUaLHCoYxRk/KuTRISu9DcKf8M7QBxKctWZw== X-Received: by 2002:ac8:3ac6:: with SMTP id x64mr25676909qte.51.1571681976002; Mon, 21 Oct 2019 11:19:36 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 21 Oct 2019 15:18:59 -0300 Message-Id: <20191021181911.14986-10-danielhb413@gmail.com> In-Reply-To: <20191021181911.14986-1-danielhb413@gmail.com> References: <20191021181911.14986-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Mon, 21 Oct 2019 18:19:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Mon, 21 Oct 2019 18:19:37 +0000 (UTC) for IP:'209.85.160.194' DOMAIN:'mail-qt1-f194.google.com' HELO:'mail-qt1-f194.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.131 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS) 209.85.160.194 mail-qt1-f194.google.com 209.85.160.194 mail-qt1-f194.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.65 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 09/21] qemu_monitor_json.c: remove unneeded cleanup label 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 X-MC-Unique: PGtMjvkbPcmV4HPrgPMt0g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" qemuMonitorJSONBlockIoThrottleInfo uses a macro called GET_THROTTLE_STATS that's defined outside of the function, which references a 'cleanup' label. GET_THROTTLE_STATS is only used inside qemuMonitorJSONBlockIoThrottleInfo (in fact, the macro is undef right after it) thus it is safe to erase the 'cleanup' reference inside the macro, then proceed with the usual cleanup label removal inside qemuMonitorJSONBlockIoThrottleInfo. Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_monitor_json.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 99f55c420a..31e10c5127 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5195,7 +5195,7 @@ int qemuMonitorJSONOpenGraphics(qemuMonitorPtr mon, _("block_io_throttle field '%s' missing " \ "in qemu's output"), \ #STORE); \ - goto cleanup; \ + return -1; \ } static int qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr io_throttle, @@ -5203,7 +5203,6 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr io= _throttle, const char *qdevid, virDomainBlockIoTuneInfoPtr reply) { - int ret =3D -1; size_t i; bool found =3D false; =20 @@ -5217,7 +5216,7 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr io= _throttle, virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("block_io_throttle device entry " "was not in expected format")); - goto cleanup; + return -1; } =20 current_qdev =3D virJSONValueObjectGetString(temp_dev, "qdev"); @@ -5227,7 +5226,7 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr io= _throttle, virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("block_io_throttle device entry " "was not in expected format")); - goto cleanup; + return -1; } =20 if ((drivealias && current_drive && STRNEQ(current_drive, driveali= as)) || @@ -5239,7 +5238,7 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr io= _throttle, virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("block_io_throttle inserted entry " "was not in expected format")); - goto cleanup; + return -1; } GET_THROTTLE_STATS("bps", total_bytes_sec); GET_THROTTLE_STATS("bps_rd", read_bytes_sec); @@ -5271,12 +5270,10 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr = io_throttle, virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot find throttling info for device '%s'"), drivealias ? drivealias : qdevid); - goto cleanup; + return -1; } - ret =3D 0; =20 - cleanup: - return ret; + return 0; } #undef GET_THROTTLE_STATS #undef GET_THROTTLE_STATS_OPTIONAL --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list