aboutsummaryrefslogtreecommitdiff
path: root/block/vhdx-log.c
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2019-03-27 10:56:34 +0100
committerKevin Wolf <kwolf@redhat.com>2019-04-30 15:29:00 +0200
commit0cb98af2187a5c7e1723fc28f8ed359634dff550 (patch)
tree8b30d2fe9ae5b31e97aee692fe6844861a1c5e91 /block/vhdx-log.c
parente9991e29ea5efb91324a1b1e10fbf553867964df (diff)
block/vhdx: Use IEC binary prefixes for size constants
Using IEC binary prefixes in order to make the code more readable, with the exception of DEFAULT_LOG_SIZE because it's passed to stringify(). Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vhdx-log.c')
-rw-r--r--block/vhdx-log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/vhdx-log.c b/block/vhdx-log.c
index 3149ff08d8..5e946846f1 100644
--- a/block/vhdx-log.c
+++ b/block/vhdx-log.c
@@ -551,7 +551,7 @@ static int vhdx_log_flush(BlockDriverState *bs, BDRVVHDXState *s,
}
if (file_length < desc_entries->hdr.last_file_offset) {
new_file_size = desc_entries->hdr.last_file_offset;
- if (new_file_size % (1024*1024)) {
+ if (new_file_size % (1 * MiB)) {
/* round up to nearest 1MB boundary */
new_file_size = QEMU_ALIGN_UP(new_file_size, MiB);
if (new_file_size > INT64_MAX) {