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/Additions/WINNT/VBoxTray/VBoxLA.cpp

    r63104 r64766  
    199199static void ActionExecutorDeleteActions(RTLISTANCHOR *listActions)
    200200{
    201     ACTIONENTRY *pIter = NULL;
    202     ACTIONENTRY *pIterNext = NULL;
     201    ACTIONENTRY *pIter;
     202    ACTIONENTRY *pIterNext;
    203203    RTListForEachSafe(listActions, pIter, pIterNext, ACTIONENTRY, nodeActionEntry)
    204204    {
     
    322322        {
    323323            bool fAdded = false;
    324             ACTIONENTRY *pIter = NULL;
     324            ACTIONENTRY *pIter;
    325325            RTListForEach(listActions, pIter, ACTIONENTRY, nodeActionEntry)
    326326            {
     
    345345
    346346#ifdef LOG_ENABLED
    347     ACTIONENTRY *pIter = NULL;
     347    ACTIONENTRY *pIter;
    348348    RTListForEach(listActions, pIter, ACTIONENTRY, nodeActionEntry)
    349349    {
     
    358358    }
    359359
    360     LogFlowFunc(("action enum %d\n",
    361            bRet));
     360    LogFlowFunc(("action enum %d\n", bRet));
    362361
    363362    return bRet;
     
    368367    LogFlowFunc(("ExecuteActions\n"));
    369368
    370     ACTIONENTRY *pIter = NULL;
     369    ACTIONENTRY *pIter;
    371370    RTListForEach(listActions, pIter, ACTIONENTRY, nodeActionEntry)
    372371    {
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