]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-talocale-20060829
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 28 Aug 2006 06:37:12 +0000 (06:37 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 28 Aug 2006 06:37:12 +0000 (06:37 +0000)
initialize variables before use

(cherry picked from commit 09f46c46d09fef191a43a42abf9224f29025ec56)

src/WINNT/talocale/tal_main.cpp

index 412058730bbb3bca1163b8750a6d17b6f639c31f..7792934ca230365176e40de297e3b03098eff6c5 100644 (file)
@@ -640,8 +640,9 @@ LPCSTRINGTEMPLATE TaLocale_GetStringResource (int ids, HINSTANCE *phInstFound)
     int iTable = (ids / 16) + 1;           // 1 = first string table
     int iIndex = ids - ((iTable-1) * 16);  // 0 = first string in the table
 
-    HINSTANCE hInstance;
-    for (size_t iModule = 0; !pst && TaLocale_EnumModule (iModule, &hInstance); ++iModule)
+    HINSTANCE hInstance = NULL;
+       size_t iModule = 0;
+    for (; !pst && TaLocale_EnumModule (iModule, &hInstance); ++iModule)
     {
         HRSRC hr;
         if ((hr = FindResourceEx (hInstance, RT_STRING, MAKEINTRESOURCE( iTable ), lang)) == NULL)