Skip to content

Commit ed008d7

Browse files
pranitbauva1997gitster
authored andcommitted
strbuf: describe the return value of strbuf_read_file
Mentored-by: Lars Schneider <[email protected]> Mentored-by: Christian Couder <[email protected]> Signed-off-by: Pranit Bauva <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7654286 commit ed008d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

strbuf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint);
363363
/**
364364
* Read the contents of a file, specified by its path. The third argument
365365
* can be used to give a hint about the file size, to avoid reallocs.
366+
* Return the number of bytes read or a negative value if some error
367+
* occurred while opening or reading the file.
366368
*/
367369
extern ssize_t strbuf_read_file(struct strbuf *sb, const char *path, size_t hint);
368370

0 commit comments

Comments
 (0)