apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Zhakov <i...@apache.org>
Subject Re: svn commit: r1806603 - /apr/apr/trunk/file_io/win32/readwrite.c
Date Wed, 30 Aug 2017 15:24:26 GMT
On 30 August 2017 at 13:57, Evgeny Kotkov <evgeny.kotkov@visualsvn.com> wrote:
> Bert Huijben <bert@qqmail.nl> writes:
>
>>>              rv = WriteFile(thefile->filehand, buf, (DWORD)*nbytes, &bwrote,
>>>                             thefile->pOverlapped);
>>> +            if (rv == APR_SUCCESS && thefile->pOverlapped) {
>>> +                thefile->filePtr += *nbytes;
>>> +            }
>>
>> The result of WriteFile should not be checked against APR_SUCCESS, as that
>> is not a documented Windows result code. The right constant evaluating to
>> 0 should be used.
>
> Unfortunately, I think that I have missed how the return value of WriteFile()
> was being checked in the last part of apr_file_write(), and both the r1806592
> and r1806603 changesets are wrong and change the behavior of the code.
>
> As these changesets were meant to be refactorings that make the code
> clearer, without altering its behavior, I think that they should be reverted
> for now.
>
> (I will prepare an alternative patch with these simplifications that doesn't
> change the behavior of the code.)
>
>
> Sorry for that,
> Evgeny Kotkov
Reverted r1806592 and r1806603 in r1806701.

-- 
Ivan Zhakov

Mime
View raw message