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 <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
This commit is contained in:
John Ferlan 2018-08-14 12:34:43 -04:00
parent 3dc6b00f0d
commit efd8261541

View File

@ -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);
}