diff options
| author | Russell Belfer <rb@github.com> | 2013-04-16 14:19:27 -0700 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2013-04-22 16:52:07 +0200 |
| commit | 38eef6113d8523abfe6746bf727cee2651398ad3 (patch) | |
| tree | 3565c7cacc968d8ddf05a8c551e3202a7a08436c /src/thread-utils.h | |
| parent | c628918625c7f779d2050a56998fb2b675f097fb (diff) | |
| download | libgit2-38eef6113d8523abfe6746bf727cee2651398ad3.tar.gz | |
Make indexer use shared packfile open code
The indexer was creating a packfile object separately from the
code in pack.c which was a problem since I put a call to
git_mutex_init into just pack.c. This commit updates the pack
function for creating a new pack object (i.e. git_packfile_check())
so that it can be used in both places and then makes indexer.c
use the shared initialization routine.
There are also a few minor formatting and warning message fixes.
Diffstat (limited to 'src/thread-utils.h')
| -rw-r--r-- | src/thread-utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread-utils.h b/src/thread-utils.h index e53a60c05..dafe70ad6 100644 --- a/src/thread-utils.h +++ b/src/thread-utils.h @@ -71,7 +71,7 @@ GIT_INLINE(int) git_atomic_dec(git_atomic *a) GIT_INLINE(void *) git___compare_and_swap( volatile void **ptr, void *oldval, void *newval) { - void *foundval; + volatile void *foundval; #if defined(GIT_WIN32) foundval = InterlockedCompareExchangePointer(ptr, newval, oldval); #elif defined(__GNUC__) |
