aboutsummaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-07-13 14:00:27 -0700
committerJunio C Hamano <gitster@pobox.com>2015-07-13 14:00:27 -0700
commitd790ba92cc534127fc4c0d58a901d1553835aa62 (patch)
tree3facd1640b2c5f11994a00400c1a641c10753f0a /strbuf.h
parent6cf7eef384968e9886e9d2eba440974c66908aa6 (diff)
parent6c8afe495b2cb6e2069942d7c006f6660e186690 (diff)
downloadgit-d790ba92cc534127fc4c0d58a901d1553835aa62.tar.gz
git-d790ba92cc534127fc4c0d58a901d1553835aa62.tar.xz
Merge branch 'mh/strbuf-read-file-returns-ssize-t'
Avoid possible ssize_t to int truncation. * mh/strbuf-read-file-returns-ssize-t: strbuf: strbuf_read_file() should return ssize_t
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/strbuf.h b/strbuf.h
index 01c5c6371..4a48c0031 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -365,7 +365,7 @@ extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint);
* Read the contents of a file, specified by its path. The third argument
* can be used to give a hint about the file size, to avoid reallocs.
*/
-extern int strbuf_read_file(struct strbuf *sb, const char *path, size_t hint);
+extern ssize_t strbuf_read_file(struct strbuf *sb, const char *path, size_t hint);
/**
* Read the target of a symbolic link, specified by its path. The third