[rsaenh/tests] Don't check result twice (Coccinelle)
Paul Vriens
paul.vriens.wine at gmail.com
Tue Jan 12 07:37:56 CST 2010
On 01/12/2010 02:32 PM, Michael Stefaniuc wrote:
> Hi Paul,
>
> Paul Vriens wrote:
>> We already check and return FALSE a few lines up.
>>
>> Found with the help of Coccinelle and the CocciCheck scripts.
>>
>> Changelog
>> Don't check result twice (Coccinelle)
>>
> --- a/dlls/rsaenh/tests/rsaenh.c
> +++ b/dlls/rsaenh/tests/rsaenh.c
> @@ -275,7 +275,6 @@ static BOOL derive_key(ALG_ID aiAlgid, HCRYPTKEY
> *phKey, DWORD len)
> return FALSE;
> }
> ok(result, "%08x\n", GetLastError());
> - if (!result) return FALSE;
> result = CryptHashData(hHash, pbData, sizeof(pbData), 0);
> ok(result, "%08x\n", GetLastError());
> if (!result) return FALSE;
> that is not the same "result"; it gets a new value after the first
> "return FALSE".
Where?
The only thing between the "return FALSE;" and the "if (!result)" is an
ok() statement.
--
Cheers,
Paul.
More information about the wine-devel
mailing list