summaryrefslogtreecommitdiff
path: root/xen-hvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xen-hvm.c')
-rw-r--r--xen-hvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen-hvm.c b/xen-hvm.c
index 01ee25de21..a0da8d7d91 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -567,7 +567,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
{
hwaddr npages = size >> TARGET_PAGE_BITS;
const int width = sizeof(unsigned long) * 8;
- unsigned long bitmap[(npages + width - 1) / width];
+ unsigned long bitmap[DIV_ROUND_UP(npages, width)];
int rc, i, j;
const XenPhysmap *physmap = NULL;