summaryrefslogtreecommitdiff
path: root/tests/attr/repo.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/attr/repo.c')
-rw-r--r--tests/attr/repo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/attr/repo.c b/tests/attr/repo.c
index ef2ad5ce9..f9ba585fb 100644
--- a/tests/attr/repo.c
+++ b/tests/attr/repo.c
@@ -129,6 +129,8 @@ static int count_attrs(
return 0;
}
+#define CANCEL_VALUE 12345
+
static int cancel_iteration(
const char *name,
const char *value,
@@ -140,7 +142,7 @@ static int cancel_iteration(
*((int *)payload) -= 1;
if (*((int *)payload) < 0)
- return -1;
+ return CANCEL_VALUE;
return 0;
}
@@ -166,7 +168,7 @@ void test_attr_repo__foreach(void)
count = 2;
cl_assert_equal_i(
- GIT_EUSER, git_attr_foreach(
+ CANCEL_VALUE, git_attr_foreach(
g_repo, 0, "sub/subdir_test1", &cancel_iteration, &count)
);
}