VirtualBox

Changeset 18150 in vbox


Ignore:
Timestamp:
Mar 23, 2009 4:29:52 PM (16 years ago)
Author:
vboxsync
Message:

Storage/VBoxHDD: small cleanup in VDClose, don't assert on normal failure path.

File:
1 edited

Legend:

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

    r17970 r18150  
    21252125VBOXDDU_DECL(int) VDClose(PVBOXHDD pDisk, bool fDelete)
    21262126{
    2127     int rc = VINF_SUCCESS;;
     2127    int rc = VINF_SUCCESS;
    21282128
    21292129    LogFlowFunc(("pDisk=%#p fDelete=%d\n", pDisk, fDelete));
     
    21352135
    21362136        PVDIMAGE pImage = pDisk->pLast;
    2137         AssertPtrBreakStmt(pImage, rc = VERR_VD_NOT_OPENED);
     2137        if (!pImage)
     2138        {
     2139            rc = VERR_VD_NOT_OPENED;
     2140            break;
     2141        }
    21382142        unsigned uOpenFlags = pImage->Backend->pfnGetOpenFlags(pImage->pvBackendData);
    21392143        /* Remove image from list of opened images. */
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