diff options
author | Vicent Martà <tanoku@gmail.com> | 2011-09-22 10:28:05 -0700 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2011-09-22 10:28:05 -0700 |
commit | 01ab592b82c4051df2be6066d7dfa59696cd453d (patch) | |
tree | 934a6951ee3d005395a8632197d7fb1722a216bb /src/index.c | |
parent | 87a26ad55e3d7a7b4753a9cf70f1481f2c61b2cd (diff) | |
parent | ad196c6ae669e2d69503eba942402e7215ea7b82 (diff) | |
download | libgit2-01ab592b82c4051df2be6066d7dfa59696cd453d.tar.gz |
Merge pull request #421 from nulltoken/ntk/fix/config-get-set-long
config: make git_config_[get|set]_long() able to properly deal with 8 bytes wide values
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.c b/src/index.c index e6a181979..f6f282d32 100644 --- a/src/index.c +++ b/src/index.c @@ -543,7 +543,7 @@ static int read_tree_internal(git_index_tree **out, { git_index_tree *tree; const char *name_start, *buffer; - long count; + int count; int error = GIT_SUCCESS; if ((tree = git__malloc(sizeof(git_index_tree))) == NULL) @@ -685,7 +685,7 @@ static int read_unmerged(git_index *index, const char *buffer, size_t size) buffer += len; for (i = 0; i < 3; i++) { - long tmp; + int tmp; if (git__strtol32(&tmp, buffer, &endptr, 8) < GIT_SUCCESS || !endptr || endptr == buffer || *endptr || (unsigned)tmp > UINT_MAX) |