From: Clemens Lang Date: Sat, 18 Feb 2012 23:37:13 +0000 (+0100) Subject: Don't set yk_errno if nothing went wrong X-Git-Tag: v1.6.4~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b80664316e2f37e43b452772cd1dceb26593e2fd;p=yubikey-personalization.old 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. --- 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; }