VirtualBox

Changeset 34560 in vbox for trunk/src


Ignore:
Timestamp:
Dec 1, 2010 11:05:54 AM (14 years ago)
Author:
vboxsync
Message:

vfsmemory.cpp: list bugfix (grumble, even with RTList* linked lists are easy to get wrong).

File:
1 edited

Legend:

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

    r34535 r34560  
    183183    {
    184184        Assert(pExtent->off <= off);
    185         PRTVFSMEMEXTENT pNext = RTListNodeGetNext(&pExtent->Entry, RTVFSMEMEXTENT, Entry);
    186         if (   RTListNodeIsLast(&pThis->ExtentHead, &pNext->Entry)
     185        PRTVFSMEMEXTENT pNext = RTListGetNext(&pThis->ExtentHead, pExtent, RTVFSMEMEXTENT, Entry);
     186        if (   !pNext
    187187            || pNext->off > off)
    188188        {
     
    223223    if (off - pExtent->off >= pExtent->cb)
    224224    {
    225         pExtent = RTListNodeGetNext(&pExtent->Entry, RTVFSMEMEXTENT, Entry);
     225        pExtent = RTListGetNext(&pThis->ExtentHead, pExtent, RTVFSMEMEXTENT, Entry);
    226226        if (   !pExtent
    227227            || off - pExtent->off >= pExtent->cb)
     
    759759                pThis->cbExtent = _4K;
    760760            else if (ObjInfo.cbObject < RTVFSMEM_MAX_EXTENT_SIZE)
    761                 pThis->cbExtent = _4K;
     761                pThis->cbExtent = _4K /* ObjInfo.cbObject */;
    762762            else
    763763                pThis->cbExtent = RTVFSMEM_MAX_EXTENT_SIZE;
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