Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
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(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)))
--
2.24.1