From b80664316e2f37e43b452772cd1dceb26593e2fd Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Sun, 19 Feb 2012 00:37:13 +0100 Subject: [PATCH] Don't set yk_errno if nothing went wrong This fixes a superfluous warning when using challenge-response authentication with yubico-pam on OS X: debug: pam_yubico.c:649 (do_challenge_response): USB error: USB error This warning appeared although no error actually occured. --- ykcore/ykcore_osx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ykcore/ykcore_osx.c b/ykcore/ykcore_osx.c index 58e3bd2..7d343a0 100644 --- a/ykcore/ykcore_osx.c +++ b/ykcore/ykcore_osx.c @@ -121,7 +121,8 @@ void *_ykusb_open_device(int vendor_id, int product_id) yk_release(); return 0; } - + + yk_errno = 0; return yk; } -- 2.39.5