VirtualBox

Changeset 14269 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 17, 2008 7:34:56 PM (16 years ago)
Author:
vboxsync
Message:

Storage/VDI: slightly faster fix for the VDI read count update. Plus lots of assert cleanup, making the code easier to read.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp

    r14250 r14269  
    384384        goto out;
    385385    }
    386     Assert(VALID_PTR(pPCHSGeometry));
    387     Assert(VALID_PTR(pLCHSGeometry));
     386    AssertPtr(PCHSGeometry);
     387    AssertPtr(pLCHSGeometry);
    388388
    389389    pImage->pInterfaceError = VDInterfaceGet(pImage->pVDIfsDisk, VDINTERFACETYPE_ERROR);
     
    756756static void vdiFreeImage(PVDIIMAGEDESC pImage, bool fDelete)
    757757{
    758     Assert(VALID_PTR(pImage));
     758    AssertPtr(pImage);
    759759
    760760    if (pImage->File != NIL_RTFILE)
     
    10091009    int rc;
    10101010
    1011     Assert(VALID_PTR(pImage));
     1011    AssertPtr(pImage);
    10121012    Assert(!(uOffset % 512));
    10131013    Assert(!(cbToRead % 512));
     
    10441044    }
    10451045
    1046     if (RT_SUCCESS(rc) || rc == VERR_VDI_BLOCK_FREE)
     1046    if (pcbActuallyRead)
    10471047        *pcbActuallyRead = cbToRead;
    10481048
     
    10631063    int rc = VINF_SUCCESS;
    10641064
    1065     Assert(VALID_PTR(pImage));
     1065    AssertPtr(pImage);
    10661066    Assert(!(uOffset % 512));
    10671067    Assert(!(cbToWrite % 512));
     
    11771177    unsigned uVersion;
    11781178
    1179     Assert(VALID_PTR(pImage));
     1179    AssertPtr(pImage);
    11801180
    11811181    if (pImage)
     
    11951195    int rc = VINF_SUCCESS;
    11961196
    1197     Assert(VALID_PTR(pImage));
    1198     Assert(VALID_PTR(penmImageType));
     1197    AssertPtr(pImage);
     1198    AssertPtr(penmImageType);
    11991199
    12001200    if (pImage)
     
    12141214    uint64_t cbSize;
    12151215
    1216     Assert(VALID_PTR(pImage));
     1216    AssertPtr(pImage);
    12171217
    12181218    if (pImage)
     
    12321232    uint64_t cb = 0;
    12331233
    1234     Assert(VALID_PTR(pImage));
     1234    AssertPtr(pImage);
    12351235
    12361236    if (pImage)
     
    12571257    int rc;
    12581258
    1259     Assert(VALID_PTR(pImage));
     1259    AssertPtr(pImage);
    12601260
    12611261    if (pImage)
     
    12841284    int rc;
    12851285
    1286     Assert(VALID_PTR(pImage));
     1286    AssertPtr(pImage);
    12871287
    12881288    if (pImage)
     
    13131313    int rc;
    13141314
    1315     Assert(VALID_PTR(pImage));
     1315    AssertPtr(pImage);
    13161316
    13171317    if (pImage)
     
    13501350    int rc;
    13511351
    1352     Assert(VALID_PTR(pImage));
     1352    AssertPtr(pImage);
    13531353
    13541354    if (pImage)
     
    13881388    unsigned uImageFlags;
    13891389
    1390     Assert(VALID_PTR(pImage));
     1390    AssertPtr(pImage);
    13911391
    13921392    if (pImage)
     
    14061406    unsigned uOpenFlags;
    14071407
    1408     Assert(VALID_PTR(pImage));
     1408    AssertPtr(pImage);
    14091409
    14101410    if (pImage)
     
    14511451    int rc = VINF_SUCCESS;
    14521452
    1453     Assert(VALID_PTR(pImage));
     1453    AssertPtr(pImage);
    14541454
    14551455    if (pImage)
     
    14791479    int rc;
    14801480
    1481     Assert(VALID_PTR(pImage));
     1481    AssertPtr(pImage);
    14821482
    14831483    if (pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY)
     
    15271527    int rc;
    15281528
    1529     Assert(VALID_PTR(pImage));
     1529    AssertPtr(pImage);
    15301530
    15311531    if (pImage)
     
    15481548    int rc = VINF_SUCCESS;
    15491549
    1550     Assert(VALID_PTR(pImage));
     1550    AssertPtr(pImage);
    15511551
    15521552    if (pImage)
     
    15821582    int rc;
    15831583
    1584     Assert(VALID_PTR(pImage));
     1584    AssertPtr(pImage);
    15851585
    15861586    if (pImage)
     
    16031603    int rc = VINF_SUCCESS;
    16041604
    1605     Assert(VALID_PTR(pImage));
     1605    AssertPtr(pImage);
    16061606
    16071607    if (pImage)
     
    16371637    int rc;
    16381638
    1639     Assert(VALID_PTR(pImage));
     1639    AssertPtr(pImage);
    16401640
    16411641    if (pImage)
     
    16581658    int rc = VINF_SUCCESS;
    16591659
    1660     Assert(VALID_PTR(pImage));
     1660    AssertPtr(pImage);
    16611661
    16621662    if (pImage)
     
    16921692    int rc;
    16931693
    1694     Assert(VALID_PTR(pImage));
     1694    AssertPtr(pImage);
    16951695
    16961696    if (pImage)
     
    17131713    int rc = VINF_SUCCESS;
    17141714
    1715     Assert(VALID_PTR(pImage));
     1715    AssertPtr(pImage);
    17161716
    17171717    if (pImage)
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