On 04/13/2017 07:19 AM, Martin Liška wrote:
Hello.
As the function is called with argument equal to zero, the memcpy should be
done just in case alloc is greater than zero.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
And gcov.exp works on x86_64-linux-gnu.
the patch is ok, but it tripped me up as the diff snipped out how alloc
was calculated, and I'd forgotten what the buffer[alloc] = 0 bit was for.
If you could amend to add a comment, it's good to go.
something like:
+ buffer[alloc] = 0; /* place nul terminators. */
nathan
--
Nathan Sidwell