From nobody Mon Feb 9 05:19:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1580910186796940.3544659955649; Wed, 5 Feb 2020 05:43:06 -0800 (PST) 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-376-TnRlTXF_PB2zA9aEAn9uyw-1; Wed, 05 Feb 2020 08:42:04 -0500 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 36E87DB6E; Wed, 5 Feb 2020 13:41:59 +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 0F06E1001B09; Wed, 5 Feb 2020 13:41:59 +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 BC15A38A1; Wed, 5 Feb 2020 13:41:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 015Df848008413 for ; Wed, 5 Feb 2020 08:41:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0751D1001B09; Wed, 5 Feb 2020 13:41:08 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8315510018FF for ; Wed, 5 Feb 2020 13:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580910185; 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=UOLw4ibItOVQpb4u3RR8zavb4Y4qGyBnRgw4pGrLYu8=; b=bT9typZRWNm9qx3dfBGRMQKlXGaHtTOo29lBbi0n+bVRymS0ub3PXp4K8QkN/x0R84MvnR N254VbJg5EQiWzHO3Ae46sCxf2sikmXTFE8uy9ZFCcDLYpMOJcuT/SEzzUZpOkCb3SSjrF Pi2M3bIcEtXVHciakTGopG0sKLJx8w0= From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/9] virDomainDiskAddISCSIPoolSourceHost: Remove ternary operator Date: Wed, 5 Feb 2020 14:40:55 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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 X-MC-Unique: TnRlTXF_PB2zA9aEAn9uyw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1c52d7f347..5ef12c7ee7 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -31342,8 +31342,10 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskD= efPtr def, def->src->hosts[0].name =3D g_strdup(pooldef->source.hosts[0].name); - def->src->hosts[0].port =3D pooldef->source.hosts[0].port ? - pooldef->source.hosts[0].port : 3260; + if (pooldef->source.hosts[0].port !=3D 0) + def->src->hosts[0].port =3D pooldef->source.hosts[0].port; + else + def->src->hosts[0].port =3D 3260; /* iscsi volume has name like "unit:0:0:1" */ if (!(tokens =3D virStringSplitCount(def->src->srcpool->volume, ":", 0= , &ntokens))) --=20 2.24.1