On Thu, Feb 25, 2016 at 5:40 PM, Junio C Hamano [off-list ref] wrote:
Duy Nguyen [off-list ref] writes:
quoted
On Fri, Feb 26, 2016 at 5:34 AM, Stefan Beller [off-list ref] wrote:
quoted
In case the length of the buffer is zero, we do not need to call the
fwrite system call as a performance improvement.
fwrite is a libc call, not system call. Are you sure it always calls
write() (assuming buffering is off)?
I do not think so, but I suspect that the patch misstates its
rationale (I said I get uncomfortable every time I see a function
that takes size and nelem separately used by a caller that can
potentially pass nleme=0, when I wondered it it is OK that no caller
of this funtion checks its return value).
This is exactly what happened. I assumed fwrite would be a system call
eventually.