From 29bddc33b456a2c8e3c81ce7f757f6a0d5efac41 Mon Sep 17 00:00:00 2001 From: Alessio Di Mauro Date: Thu, 24 Sep 2015 11:39:47 +0200 Subject: [PATCH] Fix return value check on parse_readers. --- ykcs11/ykcs11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ykcs11/ykcs11.c b/ykcs11/ykcs11.c index 9bed06a..66f2569 100644 --- a/ykcs11/ykcs11.c +++ b/ykcs11/ykcs11.c @@ -65,7 +65,7 @@ CK_DEFINE_FUNCTION(CK_RV, C_Initialize)( return CKR_FUNCTION_FAILED; } - if (parse_readers(piv_state, readers, len, slots, &n_slots, &n_slots_with_token) != CK_TRUE) + if (parse_readers(piv_state, readers, len, slots, &n_slots, &n_slots_with_token) != CKR_OK) return CKR_FUNCTION_FAILED; DBG(("Found %lu slot(s) of which %lu tokenless/unsupported", n_slots, n_slots - n_slots_with_token));