From: Stefan Beller Date: Thu, 05 Nov 2015 18:17:19 GMT Subject: [PATCH 2/2] strbuf: Correct documentation for strbuf_read_once Message-ID: <1446747439-30349-3-git-send-email-sbeller@google.com> In-Reply-To: <1446747439-30349-1-git-send-email-sbeller@google.com> No need to document the O_NONBLOCK. We will read just once and return. In case the read blocks, this works too. Signed-off-by: Stefan Beller --- strbuf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/strbuf.h b/strbuf.h index ea69665..7a08da4 100644 --- a/strbuf.h +++ b/strbuf.h @@ -367,8 +367,7 @@ extern size_t strbuf_fread(struct strbuf *, size_t, FILE *); extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint); /** - * Read from a file descriptor that is marked as O_NONBLOCK without - * blocking. Returns the number of new bytes appended to the sb. + * Returns the number of new bytes appended to the sb. * Negative return value signals there was an error returned from * underlying read(2), in which case the caller should check errno. * e.g. errno == EAGAIN when the read may have blocked. -- 2.6.1.247.ge8f2a41.dirty