From 355dddbf08ade85584f94dfb0eb4df46cb504035 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Sat, 12 Jan 2013 01:40:35 +0100 Subject: [PATCH] buf: Is this the function you were looking for? --- src/buf_text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buf_text.c b/src/buf_text.c index 0104a9057..3a8f442b4 100644 --- a/src/buf_text.c +++ b/src/buf_text.c @@ -111,7 +111,7 @@ bool git_buf_text_is_binary(const git_buf *buf) bool git_buf_text_contains_nul(const git_buf *buf) { - return (strnlen(buf->ptr, buf->size) != buf->size); + return (memchr(buf->ptr, '\0', buf->size) != NULL); } int git_buf_text_detect_bom(git_bom_t *bom, const git_buf *buf, size_t offset)