VirtualBox

Changeset 11268 in vbox


Ignore:
Timestamp:
Aug 8, 2008 4:17:22 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
34350
Message:

Devices: ELEMENTS -> RT_ELEMENTS.

Location:
trunk/src/VBox/Devices
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/alsa_stubs.c

    r8155 r11268  
    179179        return rc;
    180180    }
    181     for (i=0; i<ELEMENTS(SharedFuncs); i++)
     181    for (i=0; i<RT_ELEMENTS(SharedFuncs); i++)
    182182    {
    183183        rc = RTLdrGetSymbol(hLib, SharedFuncs[i].name, (void**)SharedFuncs[i].fn);
  • trunk/src/VBox/Devices/Audio/pulse_stubs.c

    r8155 r11268  
    246246        return rc;
    247247    }
    248     for (i=0; i<ELEMENTS(SharedFuncs); i++)
     248    for (i=0; i<RT_ELEMENTS(SharedFuncs); i++)
    249249    {
    250250        rc = RTLdrGetSymbol(hLib, SharedFuncs[i].name, (void**)SharedFuncs[i].fn);
  • 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])
  • trunk/src/VBox/Devices/Input/DevPS2.cpp

    r11266 r11268  
    11201120    cItems = s->queue.count;
    11211121    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))
    11231123        SSMR3PutU8(f, s->queue.data[i]);
    11241124    Log(("kbd_save: %d keyboard queue items stored\n", s->queue.count));
     
    11261126    cItems = s->mouse_command_queue.count;
    11271127    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))
    11291129        SSMR3PutU8(f, s->mouse_command_queue.data[i]);
    11301130    Log(("kbd_save: %d mouse command queue items stored\n", s->mouse_command_queue.count));
     
    11321132    cItems = s->mouse_event_queue.count;
    11331133    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))
    11351135        SSMR3PutU8(f, s->mouse_event_queue.data[i]);
    11361136    Log(("kbd_save: %d mouse event queue items stored\n", s->mouse_event_queue.count));
     
    11881188    if (RT_FAILURE(rc))
    11891189        return rc;
    1190     if (u32 > ELEMENTS(s->queue.data))
     1190    if (u32 > RT_ELEMENTS(s->queue.data))
    11911191    {
    11921192        AssertMsgFailed(("u32=%#x\n", u32));
     
    11991199            return rc;
    12001200    }
    1201     s->queue.wptr = u32 % ELEMENTS(s->queue.data);
     1201    s->queue.wptr = u32 % RT_ELEMENTS(s->queue.data);
    12021202    s->queue.count = u32;
    12031203    Log(("kbd_load: %d keyboard queue items loaded\n", u32));
     
    12061206    if (RT_FAILURE(rc))
    12071207        return rc;
    1208     if (u32 > ELEMENTS(s->mouse_command_queue.data))
     1208    if (u32 > RT_ELEMENTS(s->mouse_command_queue.data))
    12091209    {
    12101210        AssertMsgFailed(("u32=%#x\n", u32));
     
    12171217            return rc;
    12181218    }
    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);
    12201220    s->mouse_command_queue.count = u32;
    12211221    Log(("kbd_load: %d mouse command queue items loaded\n", u32));
     
    12241224    if (RT_FAILURE(rc))
    12251225        return rc;
    1226     if (u32 > ELEMENTS(s->mouse_event_queue.data))
     1226    if (u32 > RT_ELEMENTS(s->mouse_event_queue.data))
    12271227    {
    12281228        AssertMsgFailed(("u32=%#x\n", u32));
     
    12351235            return rc;
    12361236    }
    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);
    12381238    s->mouse_event_queue.count = u32;
    12391239    Log(("kbd_load: %d mouse event queue items loaded\n", u32));
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r11267 r11268  
    258258        STAM_PROFILE_ADV_STOP(&pData->StatReceive, a);
    259259        errno=0;
    260         int rc = poll(&aFDs[0], ELEMENTS(aFDs), -1 /* infinite */);
     260        int rc = poll(&aFDs[0], RT_ELEMENTS(aFDs), -1 /* infinite */);
    261261
    262262        /* this might have changed in the meantime */
  • trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp

    r11267 r11268  
    216216        aFDs[1].events  = POLLIN | POLLERR | POLLHUP;
    217217        aFDs[1].revents = 0;
    218         rc = poll(aFDs, ELEMENTS(aFDs), -1);
     218        rc = poll(aFDs, RT_ELEMENTS(aFDs), -1);
    219219        if (rc < 0)
    220220        {
  • trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp

    r11267 r11268  
    553553            aFDs[1].events  = POLLIN | POLLERR | POLLHUP;
    554554            aFDs[1].revents = 0;
    555             rc = poll(aFDs, ELEMENTS(aFDs), -1);
     555            rc = poll(aFDs, RT_ELEMENTS(aFDs), -1);
    556556            if (rc < 0)
    557557            {
Note: See TracChangeset for help on using the changeset viewer.

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