David Kastrup [off-list ref] writes:
Junio C Hamano [off-list ref] writes:
...
quoted
Still, I like your swapping of size and nmemb parameters, regardless
of the "don't bother calling fwrite(3) if size is zero" fix.
I don't. Far too obscure, looks like an unintentional wart waiting to
be corrected.
Oh, I did not mean it in the sense that would be a bugfix, but in the
sense that we are writing N instances of 1 byte, not 1 instance of N
byte blob, and should express size and nmemb parameters to fwrite(3) as
such. IOW, I would have preferred:
if (size && fwrite(buf, 1, size, stdout) != size)
barf(...);