diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-04-29 21:46:33 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-04-30 07:12:37 +0200 |
commit | fa6420f73e8a621cc04e95820b625097b5c2fbf2 (patch) | |
tree | b5107d76b205dfb9b475606bb284da05b01e2a79 /src/protocol.c | |
parent | 1d2dd864add4835c49744a566c226a1c7da04e99 (diff) | |
download | libgit2-fa6420f73e8a621cc04e95820b625097b5c2fbf2.tar.gz |
buf: deploy git_buf_len()
Diffstat (limited to 'src/protocol.c')
-rw-r--r-- | src/protocol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol.c b/src/protocol.c index 4c4a7f79b..a7df961a9 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -17,7 +17,7 @@ int git_protocol_store_refs(git_protocol *p, const char *data, size_t len) const char *line_end, *ptr; if (len == 0) { /* EOF */ - if (buf->size != 0) { + if (git_buf_len(buf) != 0) { giterr_set(GITERR_NET, "Unexpected EOF"); return p->error = -1; } else { @@ -30,10 +30,10 @@ int git_protocol_store_refs(git_protocol *p, const char *data, size_t len) while (1) { git_pkt *pkt; - if (buf->size == 0) + if (git_buf_len(buf) == 0) return 0; - error = git_pkt_parse_line(&pkt, ptr, &line_end, buf->size); + error = git_pkt_parse_line(&pkt, ptr, &line_end, git_buf_len(buf)); if (error == GIT_ESHORTBUFFER) return 0; /* Ask for more */ if (error < 0) |