Changeset 11268 in vbox
- Timestamp:
- Aug 8, 2008 4:17:22 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34350
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/alsa_stubs.c
r8155 r11268 179 179 return rc; 180 180 } 181 for (i=0; i< ELEMENTS(SharedFuncs); i++)181 for (i=0; i<RT_ELEMENTS(SharedFuncs); i++) 182 182 { 183 183 rc = RTLdrGetSymbol(hLib, SharedFuncs[i].name, (void**)SharedFuncs[i].fn); -
trunk/src/VBox/Devices/Audio/pulse_stubs.c
r8155 r11268 246 246 return rc; 247 247 } 248 for (i=0; i< ELEMENTS(SharedFuncs); i++)248 for (i=0; i<RT_ELEMENTS(SharedFuncs); i++) 249 249 { 250 250 rc = RTLdrGetSymbol(hLib, SharedFuncs[i].name, (void**)SharedFuncs[i].fn); -
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]) -
trunk/src/VBox/Devices/Input/DevPS2.cpp
r11266 r11268 1120 1120 cItems = s->queue.count; 1121 1121 SSMR3PutU32(f, cItems); 1122 for (i = s->queue.rptr; cItems-- > 0; i = (i + 1) % ELEMENTS(s->queue.data))1122 for (i = s->queue.rptr; cItems-- > 0; i = (i + 1) % RT_ELEMENTS(s->queue.data)) 1123 1123 SSMR3PutU8(f, s->queue.data[i]); 1124 1124 Log(("kbd_save: %d keyboard queue items stored\n", s->queue.count)); … … 1126 1126 cItems = s->mouse_command_queue.count; 1127 1127 SSMR3PutU32(f, cItems); 1128 for (i = s->mouse_command_queue.rptr; cItems-- > 0; i = (i + 1) % ELEMENTS(s->mouse_command_queue.data))1128 for (i = s->mouse_command_queue.rptr; cItems-- > 0; i = (i + 1) % RT_ELEMENTS(s->mouse_command_queue.data)) 1129 1129 SSMR3PutU8(f, s->mouse_command_queue.data[i]); 1130 1130 Log(("kbd_save: %d mouse command queue items stored\n", s->mouse_command_queue.count)); … … 1132 1132 cItems = s->mouse_event_queue.count; 1133 1133 SSMR3PutU32(f, cItems); 1134 for (i = s->mouse_event_queue.rptr; cItems-- > 0; i = (i + 1) % ELEMENTS(s->mouse_event_queue.data))1134 for (i = s->mouse_event_queue.rptr; cItems-- > 0; i = (i + 1) % RT_ELEMENTS(s->mouse_event_queue.data)) 1135 1135 SSMR3PutU8(f, s->mouse_event_queue.data[i]); 1136 1136 Log(("kbd_save: %d mouse event queue items stored\n", s->mouse_event_queue.count)); … … 1188 1188 if (RT_FAILURE(rc)) 1189 1189 return rc; 1190 if (u32 > ELEMENTS(s->queue.data))1190 if (u32 > RT_ELEMENTS(s->queue.data)) 1191 1191 { 1192 1192 AssertMsgFailed(("u32=%#x\n", u32)); … … 1199 1199 return rc; 1200 1200 } 1201 s->queue.wptr = u32 % ELEMENTS(s->queue.data);1201 s->queue.wptr = u32 % RT_ELEMENTS(s->queue.data); 1202 1202 s->queue.count = u32; 1203 1203 Log(("kbd_load: %d keyboard queue items loaded\n", u32)); … … 1206 1206 if (RT_FAILURE(rc)) 1207 1207 return rc; 1208 if (u32 > ELEMENTS(s->mouse_command_queue.data))1208 if (u32 > RT_ELEMENTS(s->mouse_command_queue.data)) 1209 1209 { 1210 1210 AssertMsgFailed(("u32=%#x\n", u32)); … … 1217 1217 return rc; 1218 1218 } 1219 s->mouse_command_queue.wptr = u32 % ELEMENTS(s->mouse_command_queue.data);1219 s->mouse_command_queue.wptr = u32 % RT_ELEMENTS(s->mouse_command_queue.data); 1220 1220 s->mouse_command_queue.count = u32; 1221 1221 Log(("kbd_load: %d mouse command queue items loaded\n", u32)); … … 1224 1224 if (RT_FAILURE(rc)) 1225 1225 return rc; 1226 if (u32 > ELEMENTS(s->mouse_event_queue.data))1226 if (u32 > RT_ELEMENTS(s->mouse_event_queue.data)) 1227 1227 { 1228 1228 AssertMsgFailed(("u32=%#x\n", u32)); … … 1235 1235 return rc; 1236 1236 } 1237 s->mouse_event_queue.wptr = u32 % ELEMENTS(s->mouse_event_queue.data);1237 s->mouse_event_queue.wptr = u32 % RT_ELEMENTS(s->mouse_event_queue.data); 1238 1238 s->mouse_event_queue.count = u32; 1239 1239 Log(("kbd_load: %d mouse event queue items loaded\n", u32)); -
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r11267 r11268 258 258 STAM_PROFILE_ADV_STOP(&pData->StatReceive, a); 259 259 errno=0; 260 int rc = poll(&aFDs[0], ELEMENTS(aFDs), -1 /* infinite */);260 int rc = poll(&aFDs[0], RT_ELEMENTS(aFDs), -1 /* infinite */); 261 261 262 262 /* this might have changed in the meantime */ -
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r11267 r11268 216 216 aFDs[1].events = POLLIN | POLLERR | POLLHUP; 217 217 aFDs[1].revents = 0; 218 rc = poll(aFDs, ELEMENTS(aFDs), -1);218 rc = poll(aFDs, RT_ELEMENTS(aFDs), -1); 219 219 if (rc < 0) 220 220 { -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r11267 r11268 553 553 aFDs[1].events = POLLIN | POLLERR | POLLHUP; 554 554 aFDs[1].revents = 0; 555 rc = poll(aFDs, ELEMENTS(aFDs), -1);555 rc = poll(aFDs, RT_ELEMENTS(aFDs), -1); 556 556 if (rc < 0) 557 557 {
Note:
See TracChangeset
for help on using the changeset viewer.