summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/refs.c b/src/refs.c
index 659ac94b8..28e8f786b 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -139,7 +139,7 @@ static int loose_parse_symbolic(git_reference *ref, git_buf *file_content)
refname_start = (const char *)file_content->ptr;
- if (file_content->size < header_len + 1)
+ if (git_buf_len(file_content) < header_len + 1)
goto corrupt;
/*
@@ -174,7 +174,7 @@ static int loose_parse_oid(git_oid *oid, git_buf *file_content)
buffer = (char *)file_content->ptr;
/* File format: 40 chars (OID) + newline */
- if (file_content->size < GIT_OID_HEXSZ + 1)
+ if (git_buf_len(file_content) < GIT_OID_HEXSZ + 1)
goto corrupt;
if (git_oid_fromstr(oid, buffer) < 0)