1
0
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:
Mark Pizzolato
2013-03-19 01:11:22 -07:00
parent 9b3694b102
commit a262dd9c14
15 changed files with 61 additions and 58 deletions

View File

@@ -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));