From: Jeffrey Altman Date: Mon, 28 Aug 2006 06:37:12 +0000 (+0000) Subject: DEVEL15-windows-talocale-20060829 X-Git-Tag: openafs-devel-1_5_8~31 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c558fbdf29357d203d3b3bd0e961c60a66517dac;p=packages%2Fo%2Fopenafs.git DEVEL15-windows-talocale-20060829 initialize variables before use (cherry picked from commit 09f46c46d09fef191a43a42abf9224f29025ec56) --- diff --git a/src/WINNT/talocale/tal_main.cpp b/src/WINNT/talocale/tal_main.cpp index 412058730..7792934ca 100644 --- a/src/WINNT/talocale/tal_main.cpp +++ b/src/WINNT/talocale/tal_main.cpp @@ -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)