From nobody Mon May 13 10:39:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1681999405; cv=none; d=zohomail.com; s=zohoarc; b=g1a9eAhIv+BcVAnkynDtnPJR/68RCzScACCz6Lq12nbJv7/qtXKbwfex5eKGvg0WEx+HdNR1hL7XYlqL6uObPT/Qr1YpCGM/FEqKviF77rhNnUSTbJ7NtM6lq3TMtbUr+lX5tct4OqUy5LcWaCWnc36QOmHFVIiIzSOu9n8WI5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681999405; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LQgTM79yggDl5DR+WxBs6esnHWZ866r81qPk9luK7Qg=; b=ac3ckUmFzY4RBsFxK2kUeXyzcDjPCmr3qtz5baXYhaqy0t4GgGVoVvqDMi6sIKh8FXKKIedxz5R1HzgTovyVJD30y2GhXYCn5t0DK191utdvzckVGKesYqzHw5LEI/ttVWvzH00pljI+PAmYY0cXWmgJdy43JHFS33kn0rptTm4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1681999405310367.7453751693961; Thu, 20 Apr 2023 07:03:25 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-127-QLGFsFYCP3ahoCWNBFgSOA-1; Thu, 20 Apr 2023 10:03:08 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 40C2B185A79C; Thu, 20 Apr 2023 14:02:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA280492C3E; Thu, 20 Apr 2023 14:02:21 +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 586651946A46; Thu, 20 Apr 2023 14:02:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A0C581946A40 for ; Thu, 20 Apr 2023 14:02:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9332BC16024; Thu, 20 Apr 2023 14:02:19 +0000 (UTC) Received: from hjs.. (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A2A5C16046 for ; Thu, 20 Apr 2023 14:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681999403; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LQgTM79yggDl5DR+WxBs6esnHWZ866r81qPk9luK7Qg=; b=WvXYH5cAX2i+Z/khwmiG4l6JhM3ep7G2GuJaWfBWCfSrvWrfivpyd0v81BpW/A1P4fS01x NPpf6Nn/vneO6kY/cBLDrL37CZpKjTOcN8iqAF9gwB0CYP74L8DZfi7oeyK6NoiSfvLgUU 0AXweufkXDTZRpHj20M17sRY/3sc04I= X-MC-Unique: QLGFsFYCP3ahoCWNBFgSOA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/4] conf: domain: remove unreachable break Date: Thu, 20 Apr 2023 16:02:13 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681999449388100001 Signed-off-by: J=C3=A1n Tomko Reviewed-by: Pavel Hrdina --- src/conf/domain_conf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 5c0b837697..cda50e56d0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -30064,7 +30064,6 @@ virDomainNetResolveActualType(virDomainNetDef *ifac= e) * is VIR_DOMAIN_NET_TYPE_BRIDGE */ return VIR_DOMAIN_NET_TYPE_BRIDGE; - break; } =20 /* intentionally fall through to the direct case for --=20 2.39.2 From nobody Mon May 13 10:39:37 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=1681999394; cv=none; d=zohomail.com; s=zohoarc; b=KU2Wg/JWNs2BniYGvX+MoznUM7/g+5pFX+EmE/S6ePY6RKoElBQlMMUNqJOi9BcCcazYLJu3L9ynUcdpPSUHRQF2nRurZnn/g0aNKBQ6+FwhFKV6dJUedf3pfv9C07Vop4vKc0SzCJR01JFRr0vGkedaZWAN2lbfAI1Jdgl00AA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681999394; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tP82Bxmmp753a2Z1uGEazbpqCiog1SW4CcIFVf/T1oc=; b=HM37xji0ED0cqB+a0wdPvSThLNGufl+wT/Nn6TVkcxESscGLIW6q36TdYerJ0TucYyCFL90O9pL6JI0Krn6rb2VWRCHJOeQhFFtyl/CTBAw/aXtnFZmBSYdoMG52UwLDVPBymBVeEf2PZDYkBBAaz4hsS+R94s25B09u77nXNmA= 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 1681999394884387.5186293665947; Thu, 20 Apr 2023 07:03:14 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-28-He0LEey9Ody58qVGtaWIWw-1; Thu, 20 Apr 2023 10:02:48 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9A670823F18; Thu, 20 Apr 2023 14:02:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7EBDF40C84A3; Thu, 20 Apr 2023 14:02:22 +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 936A41946A69; Thu, 20 Apr 2023 14:02:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5A2F51946A51 for ; Thu, 20 Apr 2023 14:02:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2FE55C16024; Thu, 20 Apr 2023 14:02:20 +0000 (UTC) Received: from hjs.. (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB0D3C16027 for ; Thu, 20 Apr 2023 14:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681999393; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tP82Bxmmp753a2Z1uGEazbpqCiog1SW4CcIFVf/T1oc=; b=g/ej3WWTpLWjbUiZT/MKKUlZbw6ZfUJiQwL1yo9a8ZyfYPwkcS5gAiwDkS6NFG8PAbhcjd GsDkk0pYnLicmQXkarHJLNqSoO6LPvlhz6tDXdJXbXRAgWbAIDdPptfmRMHEjo+khnUsud iV00/KnXaQL3633LZbcVgGehUC8vjGI= X-MC-Unique: He0LEey9Ody58qVGtaWIWw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/4] qemu: command: join two adjacent conditions Date: Thu, 20 Apr 2023 16:02:14 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681999397072100001 Signed-off-by: J=C3=A1n Tomko Reviewed-by: Pavel Hrdina --- src/qemu/qemu_command.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 4ca93bf3dc..0afb038954 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8482,9 +8482,7 @@ qemuBuildInterfaceConnect(virDomainObj *vm, vm->def, tapfd[i]) < 0) return -1; } - } =20 - if (vhostfd) { if (qemuInterfaceOpenVhostNet(vm, net) < 0) return -1; } --=20 2.39.2 From nobody Mon May 13 10:39:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1681999423; cv=none; d=zohomail.com; s=zohoarc; b=H3oh50sHhXSFhedB0sdw2BR07yueJZGpJ4P8jOrqE8uKiTglyPnE49IvxU49a4ouJgcSHH+ULs35bjiRHRqb4l1EFWrH0jUnA/kD//+P1WE8efvpSSjrtZ3u1b6TD+x4vOFKub5RCFJsEbdmpCv+qCgVU/n82V3w/WpoC4pKJZw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681999423; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vgOYOmCTzmZhvcvhL7Q/4CCHZSI8nT406wp0/ZJzfPs=; b=NzbHt0vmZqzzlgSZXI8E+t4c0ITk3wTqEuTgGLcRuhWU5wleUKlX+gzcdfmHBuBxBurZpX9Kwbo0RZ+C0cwM2YXIohGHt/CeDqh4eRKcO4ZzZM5gPgwYnPM142bUTn7KvuvfGQJRJfVDUla1Og6kFCSOG2lXpFHeByA/Lta67ME= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1681999423473230.725274070997; Thu, 20 Apr 2023 07:03:43 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-142-WejAJt-hMnqrpts5zfV5HQ-1; Thu, 20 Apr 2023 10:03:21 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 39EB3884620; Thu, 20 Apr 2023 14:02:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24A0A63A5F; Thu, 20 Apr 2023 14:02:23 +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 C7CD51946A75; Thu, 20 Apr 2023 14:02:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DBA941946A51 for ; Thu, 20 Apr 2023 14:02:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BFD43C017D7; Thu, 20 Apr 2023 14:02:20 +0000 (UTC) Received: from hjs.. (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 670BCC16026 for ; Thu, 20 Apr 2023 14:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681999420; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vgOYOmCTzmZhvcvhL7Q/4CCHZSI8nT406wp0/ZJzfPs=; b=S+QoQ9tBWckpHe5HxDSjtmJCSzl/vJnSnQtsvaywIN7CPhT1/kWuyArGRhJEL0+Ma8o47J BET7hPEuXwi5o2vp+1Qo6cpNBFIyl2Vy3g66u2IaVb9FNGq8C4YIwvInDGXN2CON2oUgGQ Yno0RIwNrR1v3lfRadV2bwgmrWi5aQI= X-MC-Unique: WejAJt-hMnqrpts5zfV5HQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/4] ch: pinVcpuLive: remove unused variable Date: Thu, 20 Apr 2023 16:02:15 +0200 Message-Id: <7a85193fbd8304b2c63087d081660f2ac1248021.1681999311.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681999425255100001 Signed-off-by: J=C3=A1n Tomko Reviewed-by: Pavel Hrdina --- src/ch/ch_driver.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index 72fe3198b2..45cdbfd37c 100644 --- a/src/ch/ch_driver.c +++ b/src/ch/ch_driver.c @@ -1148,8 +1148,6 @@ chDomainPinVcpuLive(virDomainObj *vm, virDomainVcpuDef *vcpuinfo; virCHDomainObjPrivate *priv =3D vm->privateData; =20 - g_autofree char *str =3D NULL; - if (!virCHDomainHasVcpuPids(vm)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cpu affinity is not supported")); @@ -1166,9 +1164,6 @@ chDomainPinVcpuLive(virDomainObj *vm, if (!(tmpmap =3D virBitmapNewCopy(cpumap))) return -1; =20 - if (!(str =3D virBitmapFormat(cpumap))) - return -1; - if (vcpuinfo->online) { /* Configure the corresponding cpuset cgroup before set affinity. = */ if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPU= SET)) { --=20 2.39.2 From nobody Mon May 13 10:39:37 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=1681999417; cv=none; d=zohomail.com; s=zohoarc; b=L3XPtuHBCtsXFtyNwH6kZNltuM9nsqKmZwNTwlqRYxZ1mQD4MiksuvBvuQ/BUGY9q5/ZRBgf3B2ho6WBrSethtOmXqsKMZji3bF9SSxDoLFA5gUJl27C1l8WH+GoUnOVUDvmv1LGXdR8Z02Ixpdh+xxy1+I2hX3gX3uXMHpUBj0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681999417; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=K2pn91k4NJeXBEyO3TMM8XaTDdrc0/lFBI1QJwegvfs=; b=TDc8s8zSGAvOPS+rOKb5aDqST5rCrU7Xz+TMWnjEJ4sLXrbtehiWuwH3ShK19ggKnzzs0Osk2YPwhseWxZiYs9DBWKBIR4gI4nGdTjuNlwBDFl/vpqaTOoDaYUICdczK5jF6blSbcHDwSjycQ0XYKhq1xRyrB6gD+Yu3h3bBn0w= 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 1681999416969886.8147032034121; Thu, 20 Apr 2023 07:03:36 -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-124-xLv-TvmBOpGl2NQrxOa07A-1; Thu, 20 Apr 2023 10:03:27 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CCAE11C17458; Thu, 20 Apr 2023 14:02:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BADBC40C2064; Thu, 20 Apr 2023 14:02:23 +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 14F6219452CD; Thu, 20 Apr 2023 14:02:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6CC1A1946A5E for ; Thu, 20 Apr 2023 14:02:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5C4AFC16026; Thu, 20 Apr 2023 14:02:21 +0000 (UTC) Received: from hjs.. (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 031E2C16024 for ; Thu, 20 Apr 2023 14:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681999415; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=K2pn91k4NJeXBEyO3TMM8XaTDdrc0/lFBI1QJwegvfs=; b=LDM7EwoacuEHcn07zShzRdw/s3kwZZP9oq+3llE03rXTBjbU8lfNF2C2slOHsv+a01y3RS f+U2UNtTUh3x9WpSWs0BIaAIMGuSqpQ6uf4jS6i4dVZ7tC6YCkynp+cbbXm49awgnxIRP/ YQ6QHyyjad4YDjKnttJbpXharNs2ejY= X-MC-Unique: xLv-TvmBOpGl2NQrxOa07A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 4/4] conf: storage: remove redundant condition Date: Thu, 20 Apr 2023 16:02:16 +0200 Message-Id: <85ef08fbc04c103b7443e1c8ee9ba26aa2e898ea.1681999311.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681999430512100001 We exit early if poolOptions->formatToString is false. Fixes: 9dadc7302920f9fca0057c655d03c2b0206b9a70 Signed-off-by: J=C3=A1n Tomko Reviewed-by: Pavel Hrdina --- src/conf/storage_conf.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 3e584ad9b9..68842004b7 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -364,6 +364,7 @@ virStoragePoolOptionsFormatPool(virBuffer *buf, int type) { virStoragePoolOptions *poolOptions; + size_t i; =20 if (!(poolOptions =3D virStoragePoolOptionsForPoolType(type))) return -1; @@ -374,22 +375,17 @@ virStoragePoolOptionsFormatPool(virBuffer *buf, virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); =20 - if (poolOptions->formatToString) { - size_t i; + virBufferAsprintf(buf, "\n", + (poolOptions->formatToString)(poolOptions->defaultFo= rmat)); =20 - virBufferAsprintf(buf, "\n", - (poolOptions->formatToString)(poolOptions->defau= ltFormat)); + virBufferAddLit(buf, "\n"); + virBufferAdjustIndent(buf, 2); =20 - virBufferAddLit(buf, "\n"); - virBufferAdjustIndent(buf, 2); + for (i =3D 0; i < poolOptions->lastFormat; i++) + virBufferAsprintf(buf, "%s\n", (poolOptions->format= ToString)(i)); =20 - for (i =3D 0; i < poolOptions->lastFormat; i++) - virBufferAsprintf(buf, "%s\n", - (poolOptions->formatToString)(i)); - - virBufferAdjustIndent(buf, -2); - virBufferAddLit(buf, "\n"); - } + virBufferAdjustIndent(buf, -2); + virBufferAddLit(buf, "\n"); =20 virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); --=20 2.39.2