VirtualBox

Ignore:
Timestamp:
Nov 30, 2016 10:59:48 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
112111
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/misc/aiomgr.cpp

    r63561 r64766  
    677677    unsigned      cRequests = 0;
    678678    int           rc        = VINF_SUCCESS;
     679
     680    /* Go through the list and queue the requests. */
    679681    PRTAIOMGRREQ  pReqIt;
    680682    PRTAIOMGRREQ  pReqItNext;
    681 
    682     /* Go through the list and queue the requests. */
    683683    RTListForEachSafe(&pFile->AioMgr.ListWaitingReqs, pReqIt, pReqItNext, RTAIOMGRREQ, NodeWaitingList)
    684684    {
     
    764764{
    765765    int rc = VINF_SUCCESS;
     766
    766767    PRTAIOMGRFILEINT pIt;
    767 
    768768    RTListForEach(&pThis->ListFiles, pIt, RTAIOMGRFILEINT, AioMgr.NodeAioMgrFiles)
    769769    {
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