[PATCH 6/9] virDomainDiskTranslateSourcePoolAuth: Take virStorageSourcePtr instead of virDomainDiskDefPtr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Only 'def->src' was ever used in this function. Use the source directly.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index bcb17dcc6e..4545c6b314 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -31375,18 +31375,18 @@ virDomainDiskAddISCSIPoolSourceHost(virStorageSourcePtr src,


 static int
-virDomainDiskTranslateSourcePoolAuth(virDomainDiskDefPtr def,
+virDomainDiskTranslateSourcePoolAuth(virStorageSourcePtr src,
                                      virStoragePoolSourcePtr source)
 {
     /* Only necessary when authentication set */
     if (!source->auth)
         return 0;

-    def->src->auth = virStorageAuthDefCopy(source->auth);
-    if (!def->src->auth)
+    src->auth = virStorageAuthDefCopy(source->auth);
+    if (!src->auth)
         return -1;
     /* A <disk> doesn't use <auth type='%s', so clear that out for the disk */
-    def->src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE;
+    src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE;
     return 0;
 }

@@ -31398,7 +31398,7 @@ virDomainDiskTranslateISCSIDirect(virDomainDiskDefPtr def,
     def->src->srcpool->actualtype = VIR_STORAGE_TYPE_NETWORK;
     def->src->protocol = VIR_STORAGE_NET_PROTOCOL_ISCSI;

-    if (virDomainDiskTranslateSourcePoolAuth(def,
+    if (virDomainDiskTranslateSourcePoolAuth(def->src,
                                              &pooldef->source) < 0)
         return -1;

-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux