Commit 355dddbf by Vicent Marti

buf: Is this the function you were looking for?

parent 3874f2d5
...@@ -111,7 +111,7 @@ bool git_buf_text_is_binary(const git_buf *buf) ...@@ -111,7 +111,7 @@ bool git_buf_text_is_binary(const git_buf *buf)
bool git_buf_text_contains_nul(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) int git_buf_text_detect_bom(git_bom_t *bom, const git_buf *buf, size_t offset)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment