summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Mike Hommey <mh@glandium.org>2019-05-08 08:03:54 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-05-08 12:15:25 +0900
commit5c3d5a38231c2c8c5414232cfbb662b6610662b1 (patch)
tree99ad24fe40a95f4a7e314d024c5cc458c3f5e173 /t
parentThe seventh batch (diff)
downloadtgif-5c3d5a38231c2c8c5414232cfbb662b6610662b1.tar.xz
Make fread/fwrite-like functions in http.c more like fread/fwrite.
The fread/fwrite-like functions in http.c, namely fread_buffer, fwrite_buffer, fwrite_null, fwrite_sha1_file all return the multiplication of the size and number of items they are being given. Practically speaking, it doesn't matter, because in all contexts where those functions are used, size is 1. But those functions being similar to fread and fwrite (the curl API is designed around being able to use fread and fwrite directly), it might be preferable to make them behave like fread and fwrite, which, from the fread/fwrite manual page, is: On success, fread() and fwrite() return the number of items read or written. This number equals the number of bytes transferred only when size is 1. If an error occurs, or the end of the file is reached, the return value is a short item count (or zero). Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions