Patchwork [06/14] migration: fix off-by-one in buffered_rate_limit

login
register
mail settings
Submitter Juan Quintela
Date Jan. 15, 2013, 11:18 a.m.
Message ID <1358248702-14278-7-git-send-email-quintela@redhat.com>
Download mbox | patch
Permalink /patch/212133/
State New
Headers show

Comments

Juan Quintela - Jan. 15, 2013, 11:18 a.m.
From: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/migration.c b/migration.c
index 5513dde..380f3cb 100644
--- a/migration.c
+++ b/migration.c
@@ -632,7 +632,7 @@  static int buffered_rate_limit(void *opaque)
         return ret;
     }

-    if (s->bytes_xfer > s->xfer_limit) {
+    if (s->bytes_xfer >= s->xfer_limit) {
         return 1;
     }