really small optimze remove lenvalu * sizeof(WCHAR) so it doing it only one time
Modified: trunk/reactos/lib/cpl/intl/locale.c

Modified: trunk/reactos/lib/cpl/intl/locale.c
--- trunk/reactos/lib/cpl/intl/locale.c	2005-05-12 04:17:43 UTC (rev 15235)
+++ trunk/reactos/lib/cpl/intl/locale.c	2005-05-12 05:01:23 UTC (rev 15236)
@@ -107,9 +107,9 @@
 	}
 
 	wsprintf(value, L"%04X", (DWORD)lcid);
-	lenvalue = wcslen(value);
+	lenvalue = wcslen(value) *  sizeof(WCHAR);
 
-	RegSetValueExW(localeKey, L"Locale", 0, REG_SZ, (BYTE *)value, lenvalue * sizeof(WCHAR));
+	RegSetValueExW(localeKey, L"Locale", 0, REG_SZ, (BYTE *)value, lenvalue);
 	RegCloseKey(localeKey);
 
 	// Set language
@@ -118,8 +118,8 @@
 	if (ret != ERROR_SUCCESS)
 		return;
 
-	RegSetValueExW(langKey, L"Default", 0, REG_SZ, (BYTE *)value, lenvalue * sizeof(WCHAR));
-	RegSetValueExW(langKey, L"InstallLanguage", 0, REG_SZ, (BYTE *)value, lenvalue * sizeof(WCHAR));
+	RegSetValueExW(langKey, L"Default", 0, REG_SZ, (BYTE *)value, lenvalue );
+	RegSetValueExW(langKey, L"InstallLanguage", 0, REG_SZ, (BYTE *)value, lenvalue );
 	RegCloseKey(langKey);
 }