VirtualBox

Changeset 2359 in vbox


Ignore:
Timestamp:
Apr 26, 2007 5:06:59 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
20752
Message:

Fixed variable initialization.

File:
1 edited

Legend:

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

    r2358 r2359  
    13541354    if (VBOX_FAILURE(rc))
    13551355    {
    1356         rc = vmdkError(pExtent->pImage, rc, RT_SRC_POS, N_("VMDK: error reading the magic number from file '%s'"), pszFilename);
     1356        rc = vmdkError(pImage, rc, RT_SRC_POS, N_("VMDK: error reading the magic number from file '%s'"), pszFilename);
    13571357        goto out;
    13581358    }
     
    19291929static int vmdkOpen(const char *pszFilename, unsigned uOpenFlags, PFNVDERROR pfnError, void *pvErrorUser, void **ppvBackendData)
    19301930{
    1931     int rc;
     1931    int rc = VINF_SUCCESS;
    19321932    PVMDKIMAGE pImage;
    19331933
     
    20182018        case VMDKETYPE_ESX_SPARSE:
    20192019#endif /* VBOX_WITH_VMDK_ESX */
    2020             /* Clip read range to at most the rest of the grain. */
    2021             cbRead = RT_MIN(cbRead, VMDK_SECTOR2BYTE(pExtent->cSectorsPerGrain - (uSectorOffset % pExtent->cSectorsPerGrain)));
    20222020            rc = vmdkGetSector(pImage->pGTCache, pExtent, uSectorInExtent,
    20232021                               &uSectorOffset);
    20242022            if (VBOX_FAILURE(rc))
    20252023                goto out;
     2024            /* Clip read range to at most the rest of the grain. */
     2025            cbRead = RT_MIN(cbRead, VMDK_SECTOR2BYTE(pExtent->cSectorsPerGrain - (uSectorOffset % pExtent->cSectorsPerGrain)));
    20262026            if (uSectorOffset == 0)
    20272027                rc = VINF_VDI_BLOCK_FREE;
     
    20882088        case VMDKETYPE_ESX_SPARSE:
    20892089#endif /* VBOX_WITH_VMDK_ESX */
    2090             /* Clip write range to at most the rest of the grain. */
    2091             cbWrite = RT_MIN(cbWrite, VMDK_SECTOR2BYTE(pExtent->cSectorsPerGrain - (uSectorOffset % pExtent->cSectorsPerGrain)));
    20922090            rc = vmdkGetSector(pImage->pGTCache, pExtent, uSectorInExtent,
    20932091                               &uSectorOffset);
    20942092            if (VBOX_FAILURE(rc))
    20952093                goto out;
     2094            /* Clip write range to at most the rest of the grain. */
     2095            cbWrite = RT_MIN(cbWrite, VMDK_SECTOR2BYTE(pExtent->cSectorsPerGrain - (uSectorOffset % pExtent->cSectorsPerGrain)));
    20962096            if (uSectorOffset == 0)
    20972097            {
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