OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a3804d
)
vhdx: use QEMU_ALIGN_DOWN
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 22 Jun 2017 11:04:16 +0000
(13:04 +0200)
committer
Marc-André Lureau
<marcandre.lureau@redhat.com>
Thu, 31 Aug 2017 10:29:07 +0000
(12:29 +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 <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
block/vhdx-log.c
patch
|
blob
|
history
diff --git
a/block/vhdx-log.c
b/block/vhdx-log.c
index
14b724e
..
0ac4863
100644
(file)
--- a/
block/vhdx-log.c
+++ b/
block/vhdx-log.c
@@
-902,7
+902,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;