VirtualBox

Ignore:
Timestamp:
Nov 30, 2016 10:59:48 AM (8 years ago)
Author:
vboxsync
Message:

src/VBox: Make the use of the iterator for RTListForEach()/RTListForEachSafe() more obvious. There is no need to initialize the iterator and we also must not depend on the iterator being NULL if the list was empty.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/dvm/dvm.cpp

    r62477 r64766  
    348348                    if (RT_FAILURE(rc))
    349349                    {
     350                        /* Remove all entries. */
    350351                        PRTDVMVOLUMEINTERNAL pItNext, pIt;
    351 
    352                         /* Remove all entries. */
    353352                        RTListForEachSafe(&pThis->VolumeList, pIt, pItNext, RTDVMVOLUMEINTERNAL, VolumeNode)
    354353                        {
     
    491490               && !fAllocated)
    492491        {
    493             PRTDVMVOLUMEINTERNAL pVol;
    494492            bool fVolFound = false;
    495493            uint64_t cbIntersect;
     
    503501             * contigous on the medium.
    504502             */
     503            PRTDVMVOLUMEINTERNAL pVol;
    505504            RTListForEach(&pThis->VolumeList, pVol, RTDVMVOLUMEINTERNAL, VolumeNode)
    506505            {
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