Re: [PATCH] oleaut32: check return code of Currency2Integer (Coverity)
22 Jun
2017
22 Jun
'17
6:57 a.m.
Marcus Meissner <marcus(a)jet.franken.de> wrote:
HRESULT WINAPI VarI1FromCy(CY cyIn, signed char* pcOut) { LONG i = I1_MAX + 1; + HRESUTL hr;
- VarI4FromCy(cyIn, &i); - return _VarI1FromI4(i, pcOut); + hr = VarI4FromCy(cyIn, &i); + + if (SUCCEEDED(hr)) + hr = _VarI1FromI4(i, pcOut); + return hr; }
I guess that this change makes initialization of 'i' redundant. Here and in remaining cases. Probably needs a test case though to make sure which behaviour is more correct. -- Dmitry.
3098
Age (days ago)
3098
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov