提交 e20c5b17 编写于 作者: P Peter Krempa

virDomainDiskAddISCSIPoolSourceHost: Remove ternary operator

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 4d5093ef
......@@ -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)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册