aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2016-01-24 14:09:57 +0000
committerMichael Tokarev <mjt@tls.msk.ru>2016-02-11 15:15:46 +0300
commit5b648de0ee6f705dc5792a97fd69e761bba9f1cd (patch)
tree4c7c52178f60c6e4bfdfeb8866a2854cd6741245 /migration/migration.c
parent58c652c08acaabcf5f22d33021d9ffeae2f59263 (diff)
rdma: remove check on time_spent when calculating mbs
Within the if statement, time_spent is assured to be non-zero. This patch just removes the check on time_spent when calculating mbs. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 82604d240e..a64cfcdb07 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1691,8 +1691,8 @@ static void *migration_thread(void *opaque)
double bandwidth = (double)transferred_bytes / time_spent;
max_size = bandwidth * migrate_max_downtime() / 1000000;
- s->mbps = time_spent ? (((double) transferred_bytes * 8.0) /
- ((double) time_spent / 1000.0)) / 1000.0 / 1000.0 : -1;
+ s->mbps = (((double) transferred_bytes * 8.0) /
+ ((double) time_spent / 1000.0)) / 1000.0 / 1000.0;
trace_migrate_transferred(transferred_bytes, time_spent,
bandwidth, max_size);