[PATCH] d3dx9_36: Fixed memset of a -2 32bit value (Coverity)
stefandoesinger at gmx.at
Sun Aug 7 17:35:08 CDT 2011
On Sunday 07 August 2011 13:30:22 Michael Mc Donnell wrote:
> > -1 is semi-safe, but only due to the nature of the negative
> > representation. Fix it too.
> Would using a const DWORD DWORD_MAX set to 4294967295 instead of -1
> silence Coverity?
I think the common approach is using something like ~0U. For unsigned
longs(but a DWORD isn't a long), ~0UL is not portable, so you want to use
something like ~((unsigned long) 0) if I remember correctly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part.
More information about the wine-patches