diff --git a/examples/socket/socket-bound-static-routing.cc b/examples/socket/socket-bound-static-routing.cc index c0ebed9e1..9226402c8 100644 --- a/examples/socket/socket-bound-static-routing.cc +++ b/examples/socket/socket-bound-static-routing.cc @@ -193,8 +193,7 @@ srcSocketRecv (Ptr socket) Ptr packet = socket->RecvFrom (from); packet->RemoveAllPacketTags (); packet->RemoveAllByteTags (); - InetSocketAddress address = InetSocketAddress::ConvertFrom (from); - NS_LOG_INFO ("Source Received " << packet->GetSize () << " bytes from " << address.GetIpv4()); + NS_LOG_INFO ("Source Received " << packet->GetSize () << " bytes from " << InetSocketAddress::ConvertFrom (from).GetIpv4()); if (socket->GetBoundNetDevice ()) { NS_LOG_INFO ("Socket was bound");