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/HostDrivers/VBoxNetFlt/win/drv/VBoxNetLwf-win.cpp

    r62714 r64766  
    233233    unsigned cMaxModules = (ERROR_LOG_MAXIMUM_SIZE - FIELD_OFFSET(IO_ERROR_LOG_PACKET, DumpData)) / sizeof(RTMAC);
    234234    unsigned cModules = 0;
    235     PVBOXNETLWF_MODULE pModuleCtx = NULL;
     235    PVBOXNETLWF_MODULE pModuleCtx;
    236236    NdisAcquireSpinLock(&g_VBoxNetLwfGlobals.Lock);
    237237    RTListForEach(&g_VBoxNetLwfGlobals.listModules, pModuleCtx, VBOXNETLWF_MODULE, node)
     
    25492549    AssertReturn(pThis, VERR_INVALID_PARAMETER);
    25502550    Log(("vboxNetFltOsInitInstance: trunk name=%s\n", pThis->szName));
    2551     PVBOXNETLWF_MODULE pModuleCtx = NULL;
    25522551    NdisAcquireSpinLock(&g_VBoxNetLwfGlobals.Lock);
     2552    PVBOXNETLWF_MODULE pModuleCtx;
    25532553    RTListForEach(&g_VBoxNetLwfGlobals.listModules, pModuleCtx, VBOXNETLWF_MODULE, node)
    25542554    {
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