[PATCH 03/11] util: Remove invalid parameter checks from virAuthGet{Username|Password}

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

 



Now that the virAuthGet*Path helpers make the checks, we can remove
them from here.

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>
Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/util/virauth.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/src/util/virauth.c b/src/util/virauth.c
index 7e7098317d..a04abb613b 100644
--- a/src/util/virauth.c
+++ b/src/util/virauth.c
@@ -210,14 +210,8 @@ virAuthGetUsername(virConnectPtr conn,
     if (virAuthGetConfigFilePath(conn, &path) < 0)
         return NULL;
 
-    if (!auth || !auth->cb) {
-        virReportError(VIR_ERR_INVALID_ARG, "%s",
-                       _("Missing or invalid auth pointer"));
-        return NULL;
-    }
-
     return virAuthGetUsernamePath(path, auth, servicename,
-                                 defaultUsername, hostname);
+                                  defaultUsername, hostname);
 }
 
 
@@ -292,11 +286,5 @@ virAuthGetPassword(virConnectPtr conn,
     if (virAuthGetConfigFilePath(conn, &path) < 0)
         return NULL;
 
-    if (!auth || !auth->cb) {
-        virReportError(VIR_ERR_INVALID_ARG, "%s",
-                       _("Missing or invalid auth pointer"));
-        return NULL;
-    }
-
     return virAuthGetPasswordPath(path, auth, servicename, username, hostname);
 }
-- 
2.17.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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