From: Wei Yang Date: Sun, 24 Jan 2016 14:09:57 +0000 (+0000) Subject: rdma: remove check on time_spent when calculating mbs X-Git-Tag: TizenStudio_2.0_p2.4~27^2~6^2~8^2~198^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b648de0ee6f705dc5792a97fd69e761bba9f1cd;p=sdk%2Femulator%2Fqemu.git 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 Signed-off-by: Michael Tokarev --- 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);