This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold patch rfa] fix output after short writes
On Fri, Apr 24, 2009 at 12:26, Ian Lance Taylor <iant@google.com> wrote:
>> [gold/ChangeLog]
>> 2008-04-23 ?Elliott Hughes ?<enh@google.com>
>>
>> ? ? ? ? * output.cc (Output_file::close): After short writes, continue
>> ? ? ? ? writing from the correct offset in the buffer being written.
>
> Pretty sloppy on my part.
Eh. Bugs happen. AFAIU Elliott happened to notice the issue when
reading the code, rather than as a result of bogus output.
>> - ? ? ? ? ?ssize_t bytes_written = ::write(this->o_, this->base_, bytes_to_write);
>> + ? ? ? ? ?ssize_t bytes_written = ::write(this->o_, this->base_ + offset, bytes_to_write);
>
> That looks like more than 80 characters, so break the line after the
> last comma.
>
> ? ? ? ? ?ssize_t bytes_written = ::write(this->o_, this->base_ + offset,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?bytes_to_write);
>
> OK with that change.
(The existing line was > 80 chars, so I assumed that wider was OK. 8-)
Done, and checked in.
thanks,
chris