[PATCH 1/2] dmime/tests: Added tests for IDirectMusicPerformance.

Chris Robinson chris.kcat at gmail.com
Wed Aug 11 11:56:39 CDT 2010

On Wednesday, August 11, 2010 3:12:23 am David Adam wrote:
> Hello,
> some comments about this patch
> +    if (hr != S_OK) return FALSE;
> +    else return TRUE;
> could be simplified as
> return SUCCEEDED(hr);

SUCCEEDED encompasses more than just S_OK (S_FALSE, for instance; basically 
anything that doesn't have the high bit set). Whether to test SUCCEEDED or 
S_OK explicitly depends on what the function can return and what it means.

The original behavior could instead be simplified as:
return hr==S_OK;

More information about the wine-devel mailing list