Changeset 11268 in vbox for trunk/src/VBox/Devices/Bus
- Timestamp:
- Aug 8, 2008 4:17:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r11266 r11268 1009 1009 * Iterate all the devices. 1010 1010 */ 1011 for (i = 0; i < ELEMENTS(pData->devices); i++)1011 for (i = 0; i < RT_ELEMENTS(pData->devices); i++) 1012 1012 { 1013 1013 PPCIDEVICE pDev = pData->devices[i]; … … 1078 1078 if (u32 == (uint32_t)~0) 1079 1079 break; 1080 if ( u32 >= ELEMENTS(pData->devices)1080 if ( u32 >= RT_ELEMENTS(pData->devices) 1081 1081 || u32 < i) 1082 1082 { … … 1187 1187 if ( !pszName 1188 1188 || !pPciDev 1189 || iDev >= (int) ELEMENTS(pBus->devices)1189 || iDev >= (int)RT_ELEMENTS(pBus->devices) 1190 1190 || (iDev >= 0 && iDev <= 8)) 1191 1191 { … … 1209 1209 { 1210 1210 Assert(!(pBus->iDevSearch % 8)); 1211 for (iDev = pBus->iDevSearch; iDev < (int) ELEMENTS(pBus->devices); iDev += 8)1211 for (iDev = pBus->iDevSearch; iDev < (int)RT_ELEMENTS(pBus->devices); iDev += 8) 1212 1212 if ( !pBus->devices[iDev] 1213 1213 && !pBus->devices[iDev + 1] … … 1219 1219 && !pBus->devices[iDev + 7]) 1220 1220 break; 1221 if (iDev >= (int) ELEMENTS(pBus->devices))1221 if (iDev >= (int)RT_ELEMENTS(pBus->devices)) 1222 1222 { 1223 1223 AssertMsgFailed(("Couldn't find free spot!\n")); … … 1261 1261 1262 1262 /* Find free slot for the device(s) we're moving and move them. */ 1263 for (iDevRel = pBus->iDevSearch; iDevRel < (int) ELEMENTS(pBus->devices); iDevRel += 8)1263 for (iDevRel = pBus->iDevSearch; iDevRel < (int)RT_ELEMENTS(pBus->devices); iDevRel += 8) 1264 1264 { 1265 1265 if ( !pBus->devices[iDevRel] … … 1395 1395 * Init the devices. 1396 1396 */ 1397 for (i = 0; i < ELEMENTS(pBus->devices); i++)1397 for (i = 0; i < RT_ELEMENTS(pBus->devices); i++) 1398 1398 { 1399 1399 if (pBus->devices[i])
Note:
See TracChangeset
for help on using the changeset viewer.