Re: [PATCH 2/6] Code cleanup: dwarf2read.c: Eliminate ::file_write

Jan Kratochvil
2017-06-17T17:35:20Z

On Mon, 12 Jun 2017 18:14:07 +0200, Pedro Alves wrote:
> There's no real need for all this indirection.

> - ::file_write (file, m_vec);
> + if (::fwrite (m_vec.data (), 1, m_vec.size (), file) != m_vec.size ())
> + error (_("couldn't write data to file"));

Aren't 28 characters with the variable mentioned once easier to write and more
bug-proof than to write each time 115 characters mentioning the same variable
3 times?

Jan