diff options
Diffstat (limited to 'block/vmdk.c')
-rw-r--r-- | block/vmdk.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/block/vmdk.c b/block/vmdk.c index ee09423..2901692 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1260,15 +1260,13 @@ static VmdkExtent *find_extent(BDRVVmdkState *s, static inline uint64_t vmdk_find_offset_in_cluster(VmdkExtent *extent, int64_t offset) { - uint64_t offset_in_cluster, extent_begin_offset, extent_relative_offset; + uint64_t extent_begin_offset, extent_relative_offset; uint64_t cluster_size = extent->cluster_sectors * BDRV_SECTOR_SIZE; extent_begin_offset = (extent->end_sector - extent->sectors) * BDRV_SECTOR_SIZE; extent_relative_offset = offset - extent_begin_offset; - offset_in_cluster = extent_relative_offset % cluster_size; - - return offset_in_cluster; + return extent_relative_offset % cluster_size; } static inline uint64_t vmdk_find_index_in_cluster(VmdkExtent *extent, |