Add parenthesis in while (packet = socket->Recv ()) to make clang++ (LLVM) happy

This commit is contained in:
Gustavo J. A. M. Carneiro
2012-02-22 13:56:44 +00:00
parent 5a9bcd833a
commit f233786ba1

View File

@@ -25,7 +25,7 @@ static void
SocketPrinter (Ptr<Socket> socket)
{
Ptr<Packet> packet;
while (packet = socket->Recv ())
while ((packet = socket->Recv ()))
{
std::cout << "at=" << Simulator::Now ().GetSeconds () << "s, rx bytes=" << packet->GetSize () << std::endl;
}