From efd82615418e684a4a060b676db1210f55d56b1c Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 14 Aug 2018 12:34:43 -0400 Subject: [PATCH] util: Remove invalid parameter checks from virAuthGet{Username|Password} Now that the virAuthGet*Path helpers make the checks, we can remove them from here. Signed-off-by: John Ferlan Reviewed-by: Marcos Paulo de Souza --- 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.47.2