summaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authorJacques Germishuys <jacquesg@striata.com>2014-04-11 22:07:49 +0200
committerJacques Germishuys <jacquesg@striata.com>2014-04-11 22:48:42 +0200
commitefaa342cbb62069510a3787da433e6b5b935fcde (patch)
tree3a78de11cb6b3521b49520daa09b17a4fd1bb2b8 /src/global.c
parentbcc622934a90307390f058c7ef4203f8bbcfe0d6 (diff)
downloadlibgit2-efaa342cbb62069510a3787da433e6b5b935fcde.tar.gz
Correct C90 warnings
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/global.c b/src/global.c
index 8c8f55a90..c26b4b311 100644
--- a/src/global.c
+++ b/src/global.c
@@ -183,6 +183,7 @@ int git_threads_init(void)
void git_threads_shutdown(void)
{
+ void *ptr = NULL;
pthread_once_t new_once = PTHREAD_ONCE_INIT;
if (git_atomic_dec(&git__n_inits) > 0) return;
@@ -190,7 +191,7 @@ void git_threads_shutdown(void)
/* Shut down any subsystems that have global state */
git__shutdown();
- void *ptr = pthread_getspecific(_tls_key);
+ ptr = pthread_getspecific(_tls_key);
pthread_setspecific(_tls_key, NULL);
git__free(ptr);