[gold patch rfa] fix output after short writes
Chris Demetriou
cgd@google.com
Fri Apr 24 19:49:00 GMT 2009
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
More information about the Binutils
mailing list