X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2FWINNT%2Ftalocale%2Ftal_main.cpp;h=9b1ff3d4be53d8149a6d0e8efe519f287688bef4;hp=412058730bbb3bca1163b8750a6d17b6f639c31f;hb=HEAD;hpb=c6a736486eb2704efd03082ff067858a198ae6d0 diff --git a/src/WINNT/talocale/tal_main.cpp b/src/WINNT/talocale/tal_main.cpp index 4120587..9b1ff3d 100644 --- a/src/WINNT/talocale/tal_main.cpp +++ b/src/WINNT/talocale/tal_main.cpp @@ -1,7 +1,7 @@ /* * Copyright 2000, International Business Machines Corporation and others. * All Rights Reserved. - * + * * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html @@ -60,8 +60,8 @@ void TaLocale_Initialize (void) static BOOL fInitialized = FALSE; if (!fInitialized) { - char mutexName[256]; - sprintf(mutexName, "TaLocale_Initialize pid=%d", getpid()); + TCHAR mutexName[256]; + wsprintf(mutexName, TEXT("TaLocale_Initialize pid=%d"), getpid()); HANDLE hMutex = CreateMutex(NULL, TRUE, mutexName); if ( GetLastError() == ERROR_ALREADY_EXISTS ) { if ( WaitForSingleObject( hMutex, INFINITE ) != WAIT_OBJECT_0 ) { @@ -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)