Bad flag check

Andrew Eikum aeikum at codeweavers.com
Thu Jul 14 08:23:29 CDT 2011


On 07/14/2011 05:13 AM, Francois Gouget wrote:
>
> One of my scripts noticed that the following code does not make sense
> in dlls/winmm/waveform.c:
>
> static DWORD WINMM_NotifyClient(WINMM_CBInfo *info, WORD msg,
>         DWORD_PTR param1, DWORD_PTR param2)
> {
>     if(info->flags&  DCB_NULL)
>          return MMSYSERR_NOERROR;
>
> That's because DCB_NULL is 0 so this condition is always false. What was
> the intent?
>
>

The intent is not to perform a callback if the callback type is 
DCB_NULL. But that check is wrong. It should be like "(info->flags & 
DCB_TYPEMASK) == DCB_NULL". I'll put together a patch to send off after 
today's updates.

Thanks,
Andrew



More information about the wine-devel mailing list