Changeset 19202 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Apr 27, 2009 9:51:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp
r19176 r19202 1892 1892 AssertRCBreak(rc); 1893 1893 unsigned cBlocksAllocated = (unsigned)((cbFile - pImage->offStartData - pImage->offStartBlockData) >> pImage->uShiftOffset2Index); 1894 if (cBlocksAllocated == 0) 1895 { 1896 /* No data blocks in this image, no need to compact. */ 1897 rc = VINF_SUCCESS; 1898 break; 1899 } 1894 1900 1895 1901 /* Allocate block array for back resolving. */ … … 1965 1971 if (RT_FAILURE(rc)) 1966 1972 break; 1967 if ( memcmp(pvTmp, pvBuf, cbBlock))1973 if (!memcmp(pvTmp, pvBuf, cbBlock)) 1968 1974 { 1969 1975 pImage->paBlocks[i] = VDI_IMAGE_BLOCK_FREE; … … 1998 2004 if (uBlock == VDI_IMAGE_BLOCK_FREE) 1999 2005 { 2000 unsigned uBlockData; 2001 do { 2006 unsigned uBlockData = VDI_IMAGE_BLOCK_FREE; 2007 while (uBlockUsedPos > i && uBlockData == VDI_IMAGE_BLOCK_FREE) 2008 { 2002 2009 uBlockUsedPos--; 2003 2010 uBlockData = paBlocks2[uBlockUsedPos]; 2004 } while (uBlockUsedPos > i && uBlockData == VDI_IMAGE_BLOCK_FREE);2011 } 2005 2012 /* Terminate early if there is no block which needs copying. */ 2006 2013 if (uBlockUsedPos == i)
Note:
See TracChangeset
for help on using the changeset viewer.