summaryrefslogtreecommitdiff
path: root/util/oslib-win32.c
diff options
context:
space:
mode:
authorSeokYeon Hwang <syeon.hwang@samsung.com>2015-09-09 15:04:25 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2015-09-09 16:59:45 +0900
commited04216f56ca5c7b6b89a0b3d8a487f84d904c9b (patch)
treedc3240cceb2abfa16393f217d4b890398692fdb7 /util/oslib-win32.c
parent1d8f37f3b39747085f7b091fbdaf3f827ce284d2 (diff)
parentb1050aa3a33cd319ac2cfd50562bc5080d556bc8 (diff)
downloadqemu-ed04216f56ca5c7b6b89a0b3d8a487f84d904c9b.tar.gz
qemu-ed04216f56ca5c7b6b89a0b3d8a487f84d904c9b.tar.bz2
qemu-ed04216f56ca5c7b6b89a0b3d8a487f84d904c9b.zip
Merge branch 'tizen_3.0_qemu_2.4' into tizen_3.0_develop
Change-Id: Id041f1c920109207df64105feabf237dba5cbe37 Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Diffstat (limited to 'util/oslib-win32.c')
-rw-r--r--util/oslib-win32.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index 8105239cfa..520f2fac7e 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -105,20 +105,18 @@ bool get_java_path(char **java_path)
}
if (res == ERROR_SUCCESS) {
- RegEnumKeyEx(hKey, 0, (LPSTR)strSubKeyName, &dwSubKeyNameMax,
- NULL, NULL, NULL, NULL);
- strcpy(strChoosenName, strSubKeyName);
-
- index = 1;
- while (ERROR_SUCCESS ==
- RegEnumKeyEx(hKey, index,
- (LPSTR)strSubKeyName, &dwSubKeyNameMax,
- NULL, NULL, NULL, NULL)) {
+ index = 0;
+ do {
+ dwSubKeyNameMax = JAVA_MAX_COMMAND_LENGTH;
+ res = RegEnumKeyEx(hKey,
+ index++,
+ (LPSTR)strSubKeyName,
+ &dwSubKeyNameMax,
+ NULL, NULL, NULL, NULL);
if (strcmp(strChoosenName, strSubKeyName) < 0) {
strcpy(strChoosenName, strSubKeyName);
}
- index++;
- }
+ } while (res == ERROR_SUCCESS);
RegOpenKeyEx(hKey, strChoosenName, 0,
KEY_QUERY_VALUE | MY_KEY_WOW64_64KEY, &hSubKey);