mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 03:11:48 +00:00
Put an initializer in the loop control.
This commit is contained in:
parent
28604535c4
commit
6afc8bf728
1 changed files with 1 additions and 4 deletions
|
|
@ -890,8 +890,7 @@ void win32_read_registry() {
|
|||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, keybasebuf,
|
||||
0, KEY_ENUMERATE_SUB_KEYS, &hKey) == ERROR_SUCCESS) {
|
||||
|
||||
sz = sizeof(buf);
|
||||
for (i=0; RegEnumKeyEx(hKey, i, buf, &sz, NULL, NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS; i++) {
|
||||
for (i=0; sz = sizeof(buf), RegEnumKeyEx(hKey, i, buf, &sz, NULL, NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS; i++) {
|
||||
|
||||
Snprintf(keyname, sizeof(keyname), "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\%s", buf);
|
||||
|
||||
|
|
@ -908,8 +907,6 @@ void win32_read_registry() {
|
|||
|
||||
RegCloseKey(hKey2);
|
||||
}
|
||||
|
||||
sz = sizeof(buf);
|
||||
}
|
||||
|
||||
RegCloseKey(hKey);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue