From: Martin Quinson Date: Thu, 8 Feb 2018 22:04:15 +0000 (+0100) Subject: cosmetics X-Git-Tag: v3.19~220 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0f00f7d4a510cd0126ba153d83bda2269acc16f0?hp=d8d0d2b34dd529790ca6a0a1b45925d4e81657a3 cosmetics --- diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 0ff044cd94..76f53b9005 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -383,26 +383,24 @@ void ns3_initialize(std::string TcpProtocol) ns3::Config::SetDefault ("ns3::TcpSocket::DelAckCount", ns3::UintegerValue (1)); ns3::Config::SetDefault ("ns3::TcpSocketBase::Timestamp", ns3::BooleanValue (false)); - if (TcpProtocol == "default") - return; + if (TcpProtocol == "default") { + /* nothing to do */ - if (TcpProtocol == "Reno") { + } else if (TcpProtocol == "Reno") { XBT_INFO("Switching Tcp protocol to '%s'", TcpProtocol.c_str()); ns3::Config::SetDefault ("ns3::TcpL4Protocol::SocketType", ns3::StringValue("ns3::TcpReno")); - return; - } - if (TcpProtocol == "NewReno") { + + } else if (TcpProtocol == "NewReno") { XBT_INFO("Switching Tcp protocol to '%s'", TcpProtocol.c_str()); ns3::Config::SetDefault ("ns3::TcpL4Protocol::SocketType", ns3::StringValue("ns3::TcpNewReno")); - return; - } - if (TcpProtocol == "Tahoe") { + + } else if (TcpProtocol == "Tahoe") { XBT_INFO("Switching Tcp protocol to '%s'", TcpProtocol.c_str()); ns3::Config::SetDefault ("ns3::TcpL4Protocol::SocketType", ns3::StringValue("ns3::TcpTahoe")); - return; - } - xbt_die("The ns3/TcpModel must be: NewReno or Reno or Tahoe"); + } else { + xbt_die("The ns3/TcpModel must be: NewReno or Reno or Tahoe"); + } } void ns3_add_cluster(const char* id, double bw, double lat) {