summaryrefslogtreecommitdiff
path: root/src/hash
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-08-26 14:56:31 -0700
committerRussell Belfer <rb@github.com>2013-08-26 14:56:31 -0700
commit430953417f74dfcdbe030bafc069e1c07edceeb6 (patch)
treeb8276cc0ec5e481307202ec00ef7abcade6e9d98 /src/hash
parent44d655318661affa2feb51e9d6d533bb16d7f2b5 (diff)
downloadlibgit2-430953417f74dfcdbe030bafc069e1c07edceeb6.tar.gz
Load SRWLock APIs at runtime
This loads SRWLock APIs at runtime and in their absence (i.e. on Windows before Vista) falls back on a regular CRITICAL_SECTION that will not permit concurrent readers.
Diffstat (limited to 'src/hash')
-rw-r--r--src/hash/hash_win32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hash/hash_win32.c b/src/hash/hash_win32.c
index 43d54ca6d..6732f93d7 100644
--- a/src/hash/hash_win32.c
+++ b/src/hash/hash_win32.c
@@ -46,7 +46,8 @@ GIT_INLINE(int) hash_cng_prov_init(void)
return -1;
/* Load bcrypt.dll explicitly from the system directory */
- if ((dll_path_len = GetSystemDirectory(dll_path, MAX_PATH)) == 0 || dll_path_len > MAX_PATH ||
+ if ((dll_path_len = GetSystemDirectory(dll_path, MAX_PATH)) == 0 ||
+ dll_path_len > MAX_PATH ||
StringCchCat(dll_path, MAX_PATH, "\\") < 0 ||
StringCchCat(dll_path, MAX_PATH, GIT_HASH_CNG_DLL_NAME) < 0 ||
(hash_prov.prov.cng.dll = LoadLibrary(dll_path)) == NULL)