}
static struct commit **get_bad_and_good_commits(struct repository *r,
- int *rev_nr)
+ size_t *rev_nr)
{
struct commit **rev;
- int i, n = 0;
+ size_t i, n = 0;
ALLOC_ARRAY(rev, 1 + good_revs.nr);
rev[n++] = get_commit_reference(r, current_bad_oid);
return res;
}
-static int check_ancestors(struct repository *r, int rev_nr,
+static int check_ancestors(struct repository *r, size_t rev_nr,
struct commit **rev, const char *prefix)
{
struct strvec rev_argv = STRVEC_INIT;
{
char *filename;
struct stat st;
- int fd, rev_nr;
+ int fd;
+ size_t rev_nr;
enum bisect_error res = BISECT_OK;
struct commit **rev;
timestamp_t min_generation)
{
struct commit **list = NULL;
- int i;
- int nr_commits;
+ size_t i;
+ size_t nr_commits;
int result = 1;
ALLOC_ARRAY(list, from->nr);
return result;
}
-struct commit_list *get_reachable_subset(struct commit **from, int nr_from,
- struct commit **to, int nr_to,
+struct commit_list *get_reachable_subset(struct commit **from, size_t nr_from,
+ struct commit **to, size_t nr_to,
unsigned int reachable_flag)
{
struct commit **item;
* This method uses the PARENT1 and PARENT2 flags during its operation,
* so be sure these flags are not set before calling the method.
*/
-struct commit_list *get_reachable_subset(struct commit **from, int nr_from,
- struct commit **to, int nr_to,
+struct commit_list *get_reachable_subset(struct commit **from, size_t nr_from,
+ struct commit **to, size_t nr_to,
unsigned int reachable_flag);
struct ahead_behind_count {
}
}
-void clear_commit_marks_many(int nr, struct commit **commit, unsigned int mark)
+void clear_commit_marks_many(size_t nr, struct commit **commit, unsigned int mark)
{
struct commit_list *list = NULL;
- while (nr--) {
+ for (size_t i = 0; i < nr; i++) {
clear_commit_marks_1(&list, *commit, mark);
commit++;
}
struct commit *pop_commit(struct commit_list **stack);
void clear_commit_marks(struct commit *commit, unsigned int mark);
-void clear_commit_marks_many(int nr, struct commit **commit, unsigned int mark);
+void clear_commit_marks_many(size_t nr, struct commit **commit, unsigned int mark);
enum rev_sort_order {
struct commit_list **check_reachable,
int include_reached)
{
- int i, old_nr;
+ size_t i, old_nr;
struct commit **to_clear;
if (!*check_reachable)
struct tips {
struct commit **tip;
- int nr, alloc;
+ size_t nr, alloc;
};
static void add_to_tips(struct tips *tips, const struct object_id *oid)
const int reachable_flag = 1;
struct commit_list *found_commits;
struct commit **src_commits;
- int nr_src_commits = 0, alloc_src_commits = 16;
+ size_t nr_src_commits = 0, alloc_src_commits = 16;
ALLOC_ARRAY(src_commits, alloc_src_commits);
for_each_string_list_item(item, &src_tag) {