From nobody Sun Feb 8 20:53:16 2026 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=1658322726; cv=none; d=zohomail.com; s=zohoarc; b=aYuHc4mwJxjU0olw839n6/eElad4Ves2UFY6Regtux7QTomlnwJrmhu8r1Xj1sW8IBxcYZG45lxhuT/2OtcE44pMt/rHLfSPuimuZyHnjFvgNV2AxVAYLBTqcZw7m5gZWCZQKnvJRZEkoFCznBQwDOelgsJolPEMumfGKtxFIcE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658322726; 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=UXT8t7WPH4vwUJ9UfV0izl/1kkGWdXnyJFolK6p67+s=; b=jWvvTfNWEAqsNH3UrCU9OHjfxlVdCLykXSmua6dBRFg3UiM9Rs9SjWl3Bi4xj7oa5wT3cf3nDazhmNOhJnUu/+1qo83vlfS25S3pPpkdS3g8Qimy7uTgNI+Axo728MZlSt2M0oT8gOg53nsPCJk4HUFxnx9VOG//jPvgccV/cB8= 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 1658322726913567.583914896691; Wed, 20 Jul 2022 06:12:06 -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-487-xmL8woaPOqaQwzYhpIaeXw-1; Wed, 20 Jul 2022 09:11:44 -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 6A9852806AB9; Wed, 20 Jul 2022 13:11:40 +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 F1DF5404C6C0; Wed, 20 Jul 2022 13:11:39 +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 7B51D194706C; Wed, 20 Jul 2022 13:11:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4BF181947066 for ; Wed, 20 Jul 2022 13:11:24 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 296D840D296B; Wed, 20 Jul 2022 13:11:24 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8CDB40D2962 for ; Wed, 20 Jul 2022 13:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658322725; 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=UXT8t7WPH4vwUJ9UfV0izl/1kkGWdXnyJFolK6p67+s=; b=RE8i46I2Rn3T+K1qQXKRcfkyITjsKZP42HnBKzZ6x5IhuTKJ6Uklesa7T4tUFb5b5XAUP2 pVoWWHpG5etVWqFbKr5ukRBAhXyPyq6TDdg+Vz4aY7OW3BcvmAMEf9mT2QTIrgILon5afo 3EvwWX845D+3HpQmEBpaMYGty6rzl24= X-MC-Unique: xmL8woaPOqaQwzYhpIaeXw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 9/9] domain_conf: rewrite variable setting to ternary operator Date: Wed, 20 Jul 2022 15:11:12 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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.84 on 10.11.54.1 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: 1658322727691100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e52f39c809..b600bfec31 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4206,12 +4206,8 @@ virDomainObjGetOneDefState(virDomainObj *vm, if (virDomainObjUpdateModificationImpact(vm, &flags) < 0) return NULL; =20 - if (live) { - if (flags & VIR_DOMAIN_AFFECT_LIVE) - *live =3D true; - else - *live =3D false; - } + if (live) + *live =3D (flags & VIR_DOMAIN_AFFECT_LIVE) ? true : false; =20 if (virDomainObjIsActive(vm) && flags & VIR_DOMAIN_AFFECT_CONFIG) return vm->newDef; --=20 2.35.3