Commit 53ab2bc8 authored by Ludovic Rousseau's avatar Ludovic Rousseau

MSGRemoveContext: remove dead code

Issue found by Coverity:
>>>     CID 1441490:  Code maintainability issues  (UNUSED_VALUE)
>>>     Assigning value "2148532329L" to "rv" here, but that stored value is overwritten before it can be used.
parent dd34cb36
......@@ -98,7 +98,7 @@ time.sleep(1)
print("SCardReleaseContext hcontext1")
hresult = SCardReleaseContext(hcontext1)
if hresult != SCARD_S_SUCCESS:
if hresult not in (SCARD_S_SUCCESS, SCARD_E_SHARING_VIOLATION):
raise ReleaseContextException(hresult)
time.sleep(2)
......
......@@ -896,9 +896,7 @@ static LONG MSGRemoveContext(SCARDCONTEXT hContext, SCONTEXT * threadContext)
{
/*
* if the card is locked by someone else we do not reset it
* and simulate a card removal
*/
rv = SCARD_W_REMOVED_CARD;
/* decrement card use */
(void)SCardDisconnect(hCard, SCARD_LEAVE_CARD);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment