From edf6d16eeda4782a33023eb7333473b650a7696d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 18 Jun 2016 14:38:36 +0200 Subject: [PATCH] fixup! Win32: simplify loading of DLL functions --- compat/win32.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compat/win32.h b/compat/win32.h index a7b81dcd29..79a86ec6c9 100644 --- a/compat/win32.h +++ b/compat/win32.h @@ -66,8 +66,9 @@ static inline void *get_proc_addr(struct proc_addr *proc) { /* only do this once */ if (!proc->initialized) { + HANDLE hnd; proc->initialized = 1; - HANDLE hnd = LoadLibraryA(proc->dll); + hnd = LoadLibraryA(proc->dll); if (hnd) proc->pfunction = GetProcAddress(hnd, proc->function); }