summaryrefslogtreecommitdiff
path: root/worldtime/timezone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'worldtime/timezone.cpp')
-rw-r--r--worldtime/timezone.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/worldtime/timezone.cpp b/worldtime/timezone.cpp
index ee4a8ed..5b2c31b 100644
--- a/worldtime/timezone.cpp
+++ b/worldtime/timezone.cpp
@@ -19,7 +19,6 @@ bool build_timezone_list() {
DWORD dwcbDLT;
LS_TZREG Temp;
FILETIME ftLastWrite;
- unsigned int list_index = 0;
bool win9x = false;
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TZREG, 0, KEY_ENUMERATE_SUB_KEYS, &HKlmtz) != ERROR_SUCCESS) {
@@ -28,7 +27,7 @@ bool build_timezone_list() {
return false;
}
- while(RegEnumKeyEx(HKlmtz, dwIndex++, tcName, &dwcbName, NULL, NULL, NULL, &ftLastWrite) != ERROR_NO_MORE_ITEMS) {
+ while(RegEnumKeyEx(HKlmtz, dwIndex, tcName, &dwcbName, NULL, NULL, NULL, &ftLastWrite) != ERROR_NO_MORE_ITEMS) {
if(RegOpenKeyEx(HKlmtz, tcName, 0,KEY_QUERY_VALUE, &KKtz) != ERROR_SUCCESS) {
RegCloseKey(HKlmtz);
@@ -53,11 +52,11 @@ bool build_timezone_list() {
RegCloseKey(KKtz);
- Temp.list_index = list_index;
+ Temp.list_index = dwIndex;
timezone_list.push_back(Temp);
dwcbName = MAX_SIZE;
- list_index++;
+ dwIndex++;
}
RegCloseKey(HKlmtz);