Tree: Some more size_t to unsigned int type change.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
diff --git a/src/tree.c b/src/tree.c
index 1111597..9d26b8c 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -288,7 +288,7 @@ static void sort_entries(git_treebuilder *bld)
int git_treebuilder_create(git_treebuilder **builder_p, const git_tree *source)
{
git_treebuilder *bld;
- size_t i, source_entries = DEFAULT_TREE_SIZE;
+ unsigned int i, source_entries = DEFAULT_TREE_SIZE;
assert(builder_p);
@@ -409,7 +409,7 @@ int git_treebuilder_remove(git_treebuilder *bld, const char *filename)
int git_treebuilder_write(git_oid *oid, git_repository *repo, git_treebuilder *bld)
{
- size_t i, size = 0;
+ unsigned int i, size = 0;
char filemode[MAX_FILEMODE_BYTES + 1 + 1];
git_odb_stream *stream;
int error;
@@ -443,7 +443,7 @@ int git_treebuilder_write(git_oid *oid, git_repository *repo, git_treebuilder *b
stream->write(stream, filemode, strlen(filemode));
stream->write(stream, entry->filename, entry->filename_len + 1);
stream->write(stream, (char *)entry->oid.id, GIT_OID_RAWSZ);
- }
+ }
error = stream->finalize_write(oid, stream);
stream->free(stream);
@@ -453,7 +453,7 @@ int git_treebuilder_write(git_oid *oid, git_repository *repo, git_treebuilder *b
void git_treebuilder_filter(git_treebuilder *bld, int (*filter)(const git_tree_entry *, void *), void *payload)
{
- size_t i;
+ unsigned int i;
assert(bld && filter);
@@ -466,7 +466,7 @@ void git_treebuilder_filter(git_treebuilder *bld, int (*filter)(const git_tree_e
void git_treebuilder_clear(git_treebuilder *bld)
{
- size_t i;
+ unsigned int i;
assert(bld);
for (i = 0; i < bld->entries.length; ++i) {