summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-10-01 13:57:32 -0700
committerVicent Martí <vicent@github.com>2012-10-01 13:57:32 -0700
commit8bc5caccee4ebb0b9239135fe81750f3b72a8e76 (patch)
tree8fed4cac4b5819cdf8ec56b8edfc7d2b78c22dd7 /src/refs.c
parent93b5fabcc03e465609d0d68af13f4ab2cf1e2dfd (diff)
parent7c411fd9b2aa63cdf6ace07640fdae91b695660b (diff)
downloadlibgit2-8bc5caccee4ebb0b9239135fe81750f3b72a8e76.tar.gz
Merge pull request #961 from arrbee/win64-cleanups
Win64 cleanups
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/refs.c b/src/refs.c
index 903acccbb..bd6fbee0e 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1610,12 +1610,12 @@ static int ensure_segment_validity(const char *name)
prev = *current;
}
- return current - name;
+ return (int)(current - name);
}
-static bool is_all_caps_and_underscore(const char *name, int len)
+static bool is_all_caps_and_underscore(const char *name, size_t len)
{
- int i;
+ size_t i;
char c;
assert(name && len > 0);
@@ -1667,10 +1667,10 @@ int git_reference__normalize_name(
if (segment_len > 0) {
if (normalize) {
- int cur_len = git_buf_len(buf);
+ size_t cur_len = git_buf_len(buf);
git_buf_joinpath(buf, git_buf_cstr(buf), current);
- git_buf_truncate(buf,
+ git_buf_truncate(buf,
cur_len + segment_len + (segments_count ? 1 : 0));
if (git_buf_oom(buf))
@@ -1706,7 +1706,7 @@ int git_reference__normalize_name(
goto cleanup;
if ((segments_count == 1 ) &&
- !(is_all_caps_and_underscore(name, segment_len) ||
+ !(is_all_caps_and_underscore(name, (size_t)segment_len) ||
((flags & GIT_REF_FORMAT_REFSPEC_PATTERN) && !strcmp("*", name))))
goto cleanup;