Skip to content

Commit 498d080

Browse files
author
Edward Thomson
committed
tests: use a size_t
1 parent 60e15ec commit 498d080

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

tests/iterator/iterator_helpers.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@ static void assert_at_end(git_iterator *i, bool verbose)
1818

1919
void expect_iterator_items(
2020
git_iterator *i,
21-
int expected_flat,
21+
size_t expected_flat,
2222
const char **expected_flat_paths,
23-
int expected_total,
23+
size_t expected_total,
2424
const char **expected_total_paths)
2525
{
2626
const git_index_entry *entry;
27-
int count, error;
27+
size_t count;
2828
int no_trees = !(git_iterator_flags(i) & GIT_ITERATOR_INCLUDE_TREES);
2929
bool v = false;
30-
31-
if (expected_flat < 0) { v = true; expected_flat = -expected_flat; }
32-
if (expected_total < 0) { v = true; expected_total = -expected_total; }
30+
int error;
3331

3432
if (v) fprintf(stderr, "== %s ==\n", no_trees ? "notrees" : "trees");
3533

tests/iterator/iterator_helpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
extern void expect_iterator_items(
33
git_iterator *i,
4-
int expected_flat,
4+
size_t expected_flat,
55
const char **expected_flat_paths,
6-
int expected_total,
6+
size_t expected_total,
77
const char **expected_total_paths);
88

99
extern void expect_advance_over(

0 commit comments

Comments
 (0)