qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PULL 06/14] rdma: remove check on time_spent when calcul


From: Michael Tokarev
Subject: [Qemu-trivial] [PULL 06/14] rdma: remove check on time_spent when calculating mbs
Date: Thu, 11 Feb 2016 15:18:55 +0300

From: Wei Yang <address@hidden>

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 <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
 migration/migration.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/migration/migration.c b/migration/migration.c
index 82604d2..a64cfcd 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);
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]