VirtualBox

Changeset 11268 in vbox for trunk/src/VBox/Devices/Bus


Ignore:
Timestamp:
Aug 8, 2008 4:17:22 PM (16 years ago)
Author:
vboxsync
Message:

Devices: ELEMENTS -> RT_ELEMENTS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r11266 r11268  
    10091009     * Iterate all the devices.
    10101010     */
    1011     for (i = 0; i < ELEMENTS(pData->devices); i++)
     1011    for (i = 0; i < RT_ELEMENTS(pData->devices); i++)
    10121012    {
    10131013        PPCIDEVICE pDev = pData->devices[i];
     
    10781078        if (u32 == (uint32_t)~0)
    10791079            break;
    1080         if (    u32 >= ELEMENTS(pData->devices)
     1080        if (    u32 >= RT_ELEMENTS(pData->devices)
    10811081            ||  u32 < i)
    10821082        {
     
    11871187    if (    !pszName
    11881188        ||  !pPciDev
    1189         ||  iDev >= (int)ELEMENTS(pBus->devices)
     1189        ||  iDev >= (int)RT_ELEMENTS(pBus->devices)
    11901190        ||  (iDev >= 0 && iDev <= 8))
    11911191    {
     
    12091209        {
    12101210            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)
    12121212                if (    !pBus->devices[iDev]
    12131213                    &&  !pBus->devices[iDev + 1]
     
    12191219                    &&  !pBus->devices[iDev + 7])
    12201220                    break;
    1221             if (iDev >= (int)ELEMENTS(pBus->devices))
     1221            if (iDev >= (int)RT_ELEMENTS(pBus->devices))
    12221222            {
    12231223                AssertMsgFailed(("Couldn't find free spot!\n"));
     
    12611261
    12621262            /* 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)
    12641264            {
    12651265                if (    !pBus->devices[iDevRel]
     
    13951395     * Init the devices.
    13961396     */
    1397     for (i = 0; i < ELEMENTS(pBus->devices); i++)
     1397    for (i = 0; i < RT_ELEMENTS(pBus->devices); i++)
    13981398    {
    13991399        if (pBus->devices[i])
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette