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

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



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

Reviewed-by: John Ferlan <jferlan redhat com>
Signed-off-by: John Ferlan <jferlan redhat com>
---
 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


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