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