summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Pokatilo <mail@shyxormz.net>2013-02-08 03:24:45 +0100
committerPatrick Pokatilo <mail@shyxormz.net>2013-02-08 03:24:45 +0100
commit64012fdbe67641b778cdef83583b337c079f83c2 (patch)
treeb3530811a1a30ad72ebd68cef574c93e2b2f2cb3 /src
parenta49e5bed8d2c9cdbcfcb43c679eee88875183dd7 (diff)
downloadlibgit2-64012fdbe67641b778cdef83583b337c079f83c2.tar.gz
Replace LoadLibrary with GetModuleHandle, since kernel32 is loaded by default
As requested
Diffstat (limited to 'src')
-rw-r--r--src/win32/posix_w32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c
index ca244485a..fa5f4fbe5 100644
--- a/src/win32/posix_w32.c
+++ b/src/win32/posix_w32.c
@@ -173,10 +173,10 @@ int p_readlink(const char *link, char *target, size_t target_len)
* it is not available in platforms older than Vista
*/
if (pGetFinalPath == NULL) {
- HINSTANCE library = LoadLibrary("kernel32");
+ HMODULE module = GetModuleHandle("kernel32");
- if (library != NULL)
- pGetFinalPath = (fpath_func)GetProcAddress(library, "GetFinalPathNameByHandleW");
+ if (module != NULL)
+ pGetFinalPath = (fpath_func)GetProcAddress(module, "GetFinalPathNameByHandleW");
if (pGetFinalPath == NULL) {
giterr_set(GITERR_OS,