Module: wine Branch: master Commit: 165d380852dbeb391ef22b63af33dad1f1f5a85c URL: http://source.winehq.org/git/wine.git/?a=commit;h=165d380852dbeb391ef22b63af...
Author: Juan Lang juan.lang@gmail.com Date: Tue Dec 1 15:08:21 2009 -0800
cryptnet: Change guard variable to simplify loop.
---
dlls/cryptnet/cryptnet_main.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c index ff9ab86..ea6047c 100644 --- a/dlls/cryptnet/cryptnet_main.c +++ b/dlls/cryptnet/cryptnet_main.c @@ -1580,7 +1580,9 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index, } else endTime = timeout = 0; - for (j = 0; ret && j < urlArray->cUrl; j++) + if (!ret) + error = GetLastError(); + for (j = 0; !error && j < urlArray->cUrl; j++) { PCCRL_CONTEXT crl;
@@ -1593,7 +1595,6 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index, { /* The CRL isn't time valid */ error = CRYPT_E_NO_REVOCATION_CHECK; - ret = FALSE; } else { @@ -1604,10 +1605,9 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index, { error = CRYPT_E_REVOKED; pRevStatus->dwIndex = index; - ret = FALSE; } } - if (ret && timeout) + if (!error && timeout) { DWORD time = GetTickCount();
@@ -1615,7 +1615,6 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index, { error = ERROR_TIMEOUT; pRevStatus->dwIndex = index; - ret = FALSE; } else timeout = endTime - time;