mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +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].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)))
|
||||
|
Loading…
Reference in New Issue
Block a user