Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-04-29 23:46:33 +0400
committernulltoken <emeric.fermas@gmail.com>2012-04-30 09:12:37 +0400
commitfa6420f73e8a621cc04e95820b625097b5c2fbf2 (patch)
treeb5107d76b205dfb9b475606bb284da05b01e2a79 /src/crlf.c
parent1d2dd864add4835c49744a566c226a1c7da04e99 (diff)
buf: deploy git_buf_len()
Diffstat (limited to 'src/crlf.c')
-rw-r--r--src/crlf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crlf.c b/src/crlf.c
index 536b50f1e..8fe588a35 100644
--- a/src/crlf.c
+++ b/src/crlf.c
@@ -105,7 +105,7 @@ static int crlf_load_attributes(struct crlf_attrs *ca, git_repository *repo, con
static int drop_crlf(git_buf *dest, const git_buf *source)
{
const char *scan = source->ptr, *next;
- const char *scan_end = source->ptr + source->size;
+ const char *scan_end = git_buf_cstr(source) + git_buf_len(source);
/* Main scan loop. Find the next carriage return and copy the
* whole chunk up to that point to the destination buffer.
@@ -138,7 +138,7 @@ static int crlf_apply_to_odb(git_filter *self, git_buf *dest, const git_buf *sou
assert(self && dest && source);
/* Empty file? Nothing to do */
- if (source->size == 0)
+ if (git_buf_len(source) == 0)
return 0;
/* Heuristics to see if we can skip the conversion.