summaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
Diffstat (limited to 'migration')
-rw-r--r--migration/ram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 889148dd84..68bc11c9e7 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2865,7 +2865,7 @@ static int postcopy_send_discard_bm_ram(MigrationState *ms,
for (current = 0; current < end; ) {
unsigned long one = find_next_bit(unsentmap, end, current);
- if (one <= end) {
+ if (one < end) {
unsigned long zero = find_next_zero_bit(unsentmap, end, one + 1);
unsigned long discard_length;