Only 'def->src' was ever used in this function. Use the source directly.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/domain_conf.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4545c6b314..531c765032 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -31392,30 +31392,30 @@ virDomainDiskTranslateSourcePoolAuth(virStorageSourcePtr src,
static int
-virDomainDiskTranslateISCSIDirect(virDomainDiskDefPtr def,
+virDomainDiskTranslateISCSIDirect(virStorageSourcePtr src,
virStoragePoolDefPtr pooldef)
{
- def->src->srcpool->actualtype = VIR_STORAGE_TYPE_NETWORK;
- def->src->protocol = VIR_STORAGE_NET_PROTOCOL_ISCSI;
+ src->srcpool->actualtype = VIR_STORAGE_TYPE_NETWORK;
+ src->protocol = VIR_STORAGE_NET_PROTOCOL_ISCSI;
- if (virDomainDiskTranslateSourcePoolAuth(def->src,
+ if (virDomainDiskTranslateSourcePoolAuth(src,
&pooldef->source) < 0)
return -1;
/* Source pool may not fill in the secrettype field,
* so we need to do so here
*/
- if (def->src->auth && !def->src->auth->secrettype) {
+ if (src->auth && !src->auth->secrettype) {
const char *secrettype =
virSecretUsageTypeToString(VIR_SECRET_USAGE_TYPE_ISCSI);
- def->src->auth->secrettype = g_strdup(secrettype);
+ src->auth->secrettype = g_strdup(secrettype);
}
- if (virDomainDiskAddISCSIPoolSourceHost(def->src, pooldef) < 0)
+ if (virDomainDiskAddISCSIPoolSourceHost(src, pooldef) < 0)
return -1;
- if (!def->src->initiator.iqn && pooldef->source.initiator.iqn
&&
- virStorageSourceInitiatorCopy(&def->src->initiator,
+ if (!src->initiator.iqn && pooldef->source.initiator.iqn &&
+ virStorageSourceInitiatorCopy(&src->initiator,
&pooldef->source.initiator) < 0) {
return -1;
}
@@ -31540,7 +31540,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDefPtr def)
return -1;
}
- if (virDomainDiskTranslateISCSIDirect(def, pooldef) < 0)
+ if (virDomainDiskTranslateISCSIDirect(def->src, pooldef) < 0)
return -1;
break;
@@ -31565,7 +31565,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDefPtr def)
break;
case VIR_STORAGE_SOURCE_POOL_MODE_DIRECT:
- if (virDomainDiskTranslateISCSIDirect(def, pooldef) < 0)
+ if (virDomainDiskTranslateISCSIDirect(def->src, pooldef) < 0)
return -1;
break;
}
--
2.24.1