summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-03-14 17:41:04 -0700
committerVicent Martí <tanoku@gmail.com>2012-03-14 17:41:04 -0700
commite24fbba94862fdb602846771f2ae41ef15834d10 (patch)
tree4b11910d7d315a6db667cc4af4c6749630612ed3 /src/buffer.c
parentdda708e78f3c3f43d814d46c29ab9f2b9d47ed5c (diff)
parentdeafee7bd7a9e2efcdff90627b6094d8c1519319 (diff)
downloadlibgit2-e24fbba94862fdb602846771f2ae41ef15834d10.tar.gz
Merge pull request #595 from arrbee/new-errors-odb
Update odb code to new error handling
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c
index dd245e243..b0e329908 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -215,8 +215,8 @@ void git_buf_truncate(git_buf *buf, size_t len)
void git_buf_rtruncate_at_char(git_buf *buf, char separator)
{
- int idx = git_buf_rfind_next(buf, separator);
- git_buf_truncate(buf, idx < 0 ? 0 : idx);
+ ssize_t idx = git_buf_rfind_next(buf, separator);
+ git_buf_truncate(buf, idx < 0 ? 0 : (size_t)idx);
}
void git_buf_swap(git_buf *buf_a, git_buf *buf_b)