]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/ns3/ns3_simulator.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into 'master'
[simgrid.git] / src / surf / ns3 / ns3_simulator.cpp
index ebff56b10c24932570d8fed2bef0db01687605e7..fe3c36376a94d93694eeeeb94781a52bd2a93267 100644 (file)
@@ -48,7 +48,7 @@ static void receive_callback(ns3::Ptr<ns3::Socket> socket)
   SgFlow* flow = getFlowFromSocket(socket);
   XBT_DEBUG("received on F[%p, total: %u, remain: %u]", flow, flow->total_bytes_, flow->remaining_);
 
-  if (flow->finished_ == false) {
+  if (not flow->finished_) {
     flow->finished_ = true;
     XBT_DEBUG("recv_cb of F[%p, %p, %u]", flow, flow->action_, flow->total_bytes_);
     XBT_DEBUG("Stop simulator at %f seconds", ns3::Simulator::Now().GetSeconds());
@@ -75,7 +75,7 @@ static void send_cb(ns3::Ptr<ns3::Socket> sock, uint32_t txSpace)
                 flow->remaining_);
       return;
     }
-    int amountSent = sock->Send(0, toWrite, 0);
+    int amountSent = sock->Send(nullptr, toWrite, 0);
 
     xbt_assert(amountSent > 0, "Since TxAvailable>0, amountSent should also >0");
     flow->buffered_bytes_ += amountSent;