[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 03/31] vhdx: use QEMU_ALIGN_DOWN
From: |
Marc-André Lureau |
Subject: |
[Qemu-block] [PATCH 03/31] vhdx: use QEMU_ALIGN_DOWN |
Date: |
Thu, 22 Jun 2017 14:41:36 +0200 |
I used the clang-tidy qemu-round check to generate the fix:
https://github.com/elmarco/clang-tools-extra
Signed-off-by: Marc-André Lureau <address@hidden>
---
block/vhdx-log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/vhdx-log.c b/block/vhdx-log.c
index 3f4c2aa095..6125ea4c6d 100644
--- a/block/vhdx-log.c
+++ b/block/vhdx-log.c
@@ -884,7 +884,7 @@ static int vhdx_log_write(BlockDriverState *bs,
BDRVVHDXState *s,
}
sector_offset = offset % VHDX_LOG_SECTOR_SIZE;
- file_offset = (offset / VHDX_LOG_SECTOR_SIZE) * VHDX_LOG_SECTOR_SIZE;
+ file_offset = QEMU_ALIGN_DOWN(offset, VHDX_LOG_SECTOR_SIZE);
aligned_length = length;
--
2.13.1.395.gf7b71de06
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-block] [PATCH 03/31] vhdx: use QEMU_ALIGN_DOWN,
Marc-André Lureau <=