summaryrefslogtreecommitdiff
path: root/csum-file.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-12-21 14:13:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-26 19:50:20 (GMT)
commit9af270e8c2a02afd9a3262a2c9312ee7fefbb7a3 (patch)
treecb64ac3da277efb553994e4d9fda5bad1acfbec1 /csum-file.h
parent7794a680e63a2a11b73cb1194653662f2769a792 (diff)
downloadgit-9af270e8c2a02afd9a3262a2c9312ee7fefbb7a3.zip
git-9af270e8c2a02afd9a3262a2c9312ee7fefbb7a3.tar.gz
git-9af270e8c2a02afd9a3262a2c9312ee7fefbb7a3.tar.bz2
do not pretend sha1write returns errors
The sha1write function returns an int, but it will always be "0". The failure-prone parts of the function happen in the "flush" callback, which cannot pass an error back to us. So we just end up calling die() during the flush. Let's just drop the return value altogether, as it only confuses callers into thinking that it might be useful. Only one call site actually checked the return value. We can drop that check, since it just led to a die() anyway. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'csum-file.h')
-rw-r--r--csum-file.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/csum-file.h b/csum-file.h
index 3b540bd..6a55c7d 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -34,7 +34,7 @@ extern struct sha1file *sha1fd(int fd, const char *name);
extern struct sha1file *sha1fd_check(const char *name);
extern struct sha1file *sha1fd_throughput(int fd, const char *name, struct progress *tp);
extern int sha1close(struct sha1file *, unsigned char *, unsigned int);
-extern int sha1write(struct sha1file *, void *, unsigned int);
+extern void sha1write(struct sha1file *, void *, unsigned int);
extern void sha1flush(struct sha1file *f);
extern void crc32_begin(struct sha1file *);
extern uint32_t crc32_end(struct sha1file *);