mirror of
https://github.com/simh/simh.git
synced 2026-02-06 08:25:53 +00:00
Compiler indicated cleanups
This commit is contained in:
@@ -524,11 +524,12 @@ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, KEY_
|
||||
/* Enumerate all the values underneath HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM */
|
||||
while (RegEnumValueA(hSERIALCOMM, dwIndex, list[ports].desc, &dwValueNameSize, NULL, &dwType, (BYTE *)list[ports].name, &dwDataSize) == ERROR_SUCCESS) {
|
||||
/* String values with non-zero size are the interesting ones */
|
||||
if ((dwType == REG_SZ) && (dwDataSize > 0))
|
||||
if ((dwType == REG_SZ) && (dwDataSize > 0)) {
|
||||
if (ports < max)
|
||||
++ports;
|
||||
else
|
||||
break;
|
||||
}
|
||||
/* Besure to clear the working entry before trying again */
|
||||
memset(list[ports].name, 0, sizeof(list[ports].name));
|
||||
memset(list[ports].desc, 0, sizeof(list[ports].desc));
|
||||
|
||||
Reference in New Issue
Block a user