From 6bfbef9f30ea098492f0150dfeee92b35642a822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20D=C3=B6pmann?= Date: Sat, 3 Jun 2017 11:46:52 -0700 Subject: [PATCH] internet: Explicitly cast a floating point computation (related to bug #2658) --- src/internet/model/tcp-hybla.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internet/model/tcp-hybla.cc b/src/internet/model/tcp-hybla.cc index 46f039ddd..a23e4496a 100644 --- a/src/internet/model/tcp-hybla.cc +++ b/src/internet/model/tcp-hybla.cc @@ -110,7 +110,7 @@ TcpHybla::SlowStart (Ptr tcb, uint32_t segmentsAcked) double increment = std::pow (2, m_rho) - 1.0; NS_LOG_INFO ("Slow start: inc=" << increment); - tcb->m_cWnd = std::min (tcb->m_cWnd + (increment * tcb->m_segmentSize), + tcb->m_cWnd = std::min (tcb->m_cWnd + (uint32_t)(increment * tcb->m_segmentSize), tcb->m_ssThresh); NS_LOG_INFO ("In SlowStart, updated to cwnd " << tcb->m_cWnd <<