Fix threading tests when threads disabled

This commit is contained in:
Russell Belfer
2014-04-17 14:43:46 -07:00
parent 52bb0476a8
commit 3816debc13
2 changed files with 12 additions and 11 deletions
+2 -1
View File
@@ -18,11 +18,12 @@ static void run_in_parallel(
int r, t, *id = git__calloc(threads, sizeof(int));
#ifdef GIT_THREADS
git_thread *th = git__calloc(threads, sizeof(git_thread));
cl_assert(th != NULL);
#else
void *th = NULL;
#endif
cl_assert(id != NULL && th != NULL);
cl_assert(id != NULL);
for (r = 0; r < repeats; ++r) {
_repo = cl_git_sandbox_reopen(); /* reopen sandbox to flush caches */