virDomainDiskAddISCSIPoolSourceHost: Remove ternary operator

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-02-05 12:30:31 +01:00
parent 4d5093ef75
commit e20c5b1703

View File

@ -31344,8 +31344,10 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
def->src->hosts[0].name = g_strdup(pooldef->source.hosts[0].name);
def->src->hosts[0].port = pooldef->source.hosts[0].port ?
pooldef->source.hosts[0].port : 3260;
if (pooldef->source.hosts[0].port != 0)
def->src->hosts[0].port = pooldef->source.hosts[0].port;
else
def->src->hosts[0].port = 3260;
/* iscsi volume has name like "unit:0:0:1" */
if (!(tokens = virStringSplitCount(def->src->srcpool->volume, ":", 0, &ntokens)))