[PATCH 1/2] vbscript/tests: Drop static keyword from variables in is_lang_english.

Alex Henrie <[email protected]>
Newsgroups gmane.comp.emulators.wine.patches
Message-ID <[email protected]>
Signed-off-by: Alex Henrie <[email protected]>
---
The function is only called once.
---
 dlls/vbscript/tests/run.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c
index 81b1ced463..8a6d7e321a 100644
--- a/dlls/vbscript/tests/run.c
+++ b/dlls/vbscript/tests/run.c
@@ -209,16 +209,13 @@ static const char *vt2a(VARIANT *v)
  */
 static BOOL is_lang_english(void)
 {
-    static HMODULE hkernel32 = NULL;
-    static LANGID (WINAPI *pGetThreadUILanguage)(void) = NULL;
-    static LANGID (WINAPI *pGetUserDefaultUILanguage)(void) = NULL;
+    HMODULE hkernel32 = NULL;
+    LANGID (WINAPI *pGetThreadUILanguage)(void) = NULL;
+    LANGID (WINAPI *pGetUserDefaultUILanguage)(void) = NULL;
 
-    if (!hkernel32)
-    {
-        hkernel32 = GetModuleHandleA("kernel32.dll");
-        pGetThreadUILanguage = (void*)GetProcAddress(hkernel32, "GetThreadUILanguage");
-        pGetUserDefaultUILanguage = (void*)GetProcAddress(hkernel32, "GetUserDefaultUILanguage");
-    }
+    hkernel32 = GetModuleHandleA("kernel32.dll");
+    pGetThreadUILanguage = (void*)GetProcAddress(hkernel32, "GetThreadUILanguage");
+    pGetUserDefaultUILanguage = (void*)GetProcAddress(hkernel32, "GetUserDefaultUILanguage");
     if (pGetThreadUILanguage && PRIMARYLANGID(pGetThreadUILanguage()) != LANG_ENGLISH)
         return FALSE;
     if (pGetUserDefaultUILanguage && PRIMARYLANGID(pGetUserDefaultUILanguage()) != LANG_ENGLISH)
-- 
2.14.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.