# [PATCH v2] strbuf: describe the return value of strbuf_read_file

1 messages from 2016-06-16 to 2016-06-16. Participants: Pranit Bauva.
Thread: https://gitlist.dev/t/42599

## Pranit Bauva, 2016-06-14 06:14

Subject: [PATCH v2] strbuf: describe the return value of strbuf_read_file
Message-ID: <20160614061411.4061-1-pranit.bauva@gmail.com>
URL: https://gitlist.dev/e/20160614061411.4061-1-pranit.bauva%40gmail.com

```
Mentored-by: Lars Schneider <larsxschneider@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
---
 strbuf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/strbuf.h b/strbuf.h
index 7987405..83c5c98 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -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);
 
-- 
2.8.4

```
