Skip to contentSkip to conversation

strbuf: describe the return value of strbuf_read_file

PATCH New Pranit Bauva 1 participant 1 message Jun 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 strbuf: describe the return value of strbuf_read_file

---
 strbuf.h | 2 ++
 1 file changed, 2 insertions(+)
strbuf.h +2 -0
index 7987405..83c5c98 100644
@@ -377,6 +377,8 @@ extern ssize_t strbuf_read_once(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.
+ * Return the number of bytes read or a negative value if some error
+ * occurred while opening or reading the file.
  */
 extern ssize_t strbuf_read_file(struct strbuf *sb, const char *path, size_t hint);
 
Signature · 1 line
2.8.4