[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-dev
Subject:    Re: svn commit: r1806603 - /apr/apr/trunk/file_io/win32/readwrite.c
From:       Ivan Zhakov <ivan () apache ! org>
Date:       2017-08-30 15:24:26
Message-ID: CABw-3YeExbE78htgHMtvv63+GDyLmiLy0umoHRm=tWJKc37fZw () mail ! gmail ! com
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic