Minidriver CardGetChallenge() parameters are output only

According to minidriver specs CardGetChallenge() method parameters
are purely for output and do not have a meaning of requested challenge
length, so remove a misleading log line.

There is also no need to have a special case for pcbChallengeData being
NULL since in this case the function would have exited early anyway with
SCARD_E_INVALID_PARAMETER (also, it was just dereferenced in the previous
code line).

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
This commit is contained in:
Maciej S. Szmigiero 2017-03-14 23:03:13 +01:00 committed by Frank Morgner
parent 56f880613a
commit d203ad76a4

View File

@ -2982,15 +2982,6 @@ DWORD WINAPI CardGetChallenge(__in PCARD_DATA pCardData,
if (!ppbChallengeData || !pcbChallengeData)
return SCARD_E_INVALID_PARAMETER;
logprintf(pCardData, 1, "Asked challenge length %lu, buffer %p\n",
(unsigned long)*pcbChallengeData, *ppbChallengeData);
if (pcbChallengeData == NULL) {
*ppbChallengeData = NULL;
logprintf(pCardData, 7, "returns zero bytes\n");
return SCARD_S_SUCCESS;
}
vs = (VENDOR_SPECIFIC*)(pCardData->pvVendorSpecific);
check_reader_status(pCardData);