Changeset 103528 in vbox for trunk/src/VBox/Storage/VDI.cpp
- Timestamp:
- Feb 22, 2024 11:29:39 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VDI.cpp
r103524 r103528 1643 1643 else if (pImage->paBlocks[uBlock] == VDI_IMAGE_BLOCK_ZERO) 1644 1644 { 1645 size_t cbSet; 1646 1647 cbSet = vdIfIoIntIoCtxSet(pImage->pIfIo, pIoCtx, 0, cbToRead); 1645 size_t cbSet = vdIfIoIntIoCtxSet(pImage->pIfIo, pIoCtx, 0, cbToRead); 1648 1646 Assert(cbSet == cbToRead); RT_NOREF(cbSet); 1649 1647 } … … 2821 2819 { 2822 2820 unsigned const cbBlock = getImageBlockSize(&pImage->Header); 2823 size_t const cbPreAllocated = offDiscard % cbBlock;2821 size_t const cbPreAllocated = offDiscard % RT_MAX(cbBlock, 1); /* MSVC thinks it is clever and says there is a potential mod by 0 here, hence the RT_MAX... */ 2824 2822 size_t const cbPostAllocated = getImageBlockSize(&pImage->Header) - cbDiscard - cbPreAllocated; 2825 2823 uint8_t *pbBlockData;
Note:
See TracChangeset
for help on using the changeset viewer.