summaryrefslogtreecommitdiff
path: root/src/crlf.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-04-29 21:46:33 +0200
committernulltoken <emeric.fermas@gmail.com>2012-04-30 07:12:37 +0200
commitfa6420f73e8a621cc04e95820b625097b5c2fbf2 (patch)
treeb5107d76b205dfb9b475606bb284da05b01e2a79 /src/crlf.c
parent1d2dd864add4835c49744a566c226a1c7da04e99 (diff)
downloadlibgit2-fa6420f73e8a621cc04e95820b625097b5c2fbf2.tar.gz
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.