advapi32: Correct tests under WOW64 (try 2)
wine-devel at kievinfo.com
Mon Mar 12 08:06:16 CDT 2012
On 03/12/2012 03:23 AM, Alexandre Julliard wrote:
> Vitaliy Margolen<wine-devel at kievinfo.com> writes:
>> On 03/10/2012 09:44 AM, André Hentschel wrote:
>>> Am 10.03.2012 17:37, schrieb Vitaliy Margolen:
>>>> On 03/10/2012 12:36 AM, Alistair Leslie-Hughes wrote:
>>>>> Marked test as broken if it returns true.
>>>>> + /* WoW64 return TRUE with the LastError set */
>>>>> + ok((!ret&& GetLastError() == ERROR_INSUFFICIENT_BUFFER) || broken(ret),
>>>>> "%d with error %d\n", ret, GetLastError());
>>>> This is incorrect. You can check or report result of GetLastError(). But not both at the same time. You have to store the result in additional variable. Then compare and report it.
>>> Really? That's quite common practice. The value won't change between the two GetLastError() calls.
>> It sure can change.
> Of course not.
>>> The only thing which is bad is if you test a function inside the ok() macro and report the last error in the same ok().
>> Isn't that what I said? To clarify, it applies to any printf type
>> function that has call to GetLastError() as a parameter.
> There's nothing magical about printf.
As always you right, my apologies. Was thinking about other code cleanup
that was moving function calls outside of ok() check when also printing
More information about the wine-devel