mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 23:25:24 +00:00
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:
parent
4d5093ef75
commit
e20c5b1703
@ -31344,8 +31344,10 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
|
|||||||
|
|
||||||
def->src->hosts[0].name = g_strdup(pooldef->source.hosts[0].name);
|
def->src->hosts[0].name = g_strdup(pooldef->source.hosts[0].name);
|
||||||
|
|
||||||
def->src->hosts[0].port = pooldef->source.hosts[0].port ?
|
if (pooldef->source.hosts[0].port != 0)
|
||||||
pooldef->source.hosts[0].port : 3260;
|
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" */
|
/* iscsi volume has name like "unit:0:0:1" */
|
||||||
if (!(tokens = virStringSplitCount(def->src->srcpool->volume, ":", 0, &ntokens)))
|
if (!(tokens = virStringSplitCount(def->src->srcpool->volume, ":", 0, &ntokens)))
|
||||||
|
Loading…
Reference in New Issue
Block a user