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

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2012-02-22 13:50:26 +00:00
1 parent 7552c7a286
commit bb0bc3a9e3
6 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
Address from;
while (packet = socket->RecvFrom (from))
while ((packet = socket->RecvFrom (from)))
{
if (packet->GetSize () > 0)
{
+1 -1
View File
@@ -143,7 +143,7 @@ void
RoutingExperiment::ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
while (packet = socket->Recv ())
while ((packet = socket->Recv ()))
{
bytesTotal += packet->GetSize ();
packetsReceived += 1;
+1 -1
View File
@@ -240,7 +240,7 @@ Receiver::Receive (Ptr<Socket> socket)
Ptr<Packet> packet;
Address from;
while (packet = socket->RecvFrom (from)) {
while ((packet = socket->RecvFrom (from))) {
if (InetSocketAddress::IsMatchingType (from)) {
NS_LOG_INFO ("Received " << packet->GetSize () << " bytes from " <<
InetSocketAddress::ConvertFrom (from).GetIpv4 ());
+1 -1
View File
@@ -163,7 +163,7 @@ void
Experiment::ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
while (packet = socket->Recv ())
while ((packet = socket->Recv ()))
{
bytesTotal += packet->GetSize ();
}
+1 -1
View File
@@ -94,7 +94,7 @@ void
Experiment::ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
while (packet = socket->Recv ())
while ((packet = socket->Recv ()))
{
m_bytesTotal += packet->GetSize ();
}
+1 -1
View File
@@ -81,7 +81,7 @@ void
Experiment::ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
while (packet = socket->Recv ())
while ((packet = socket->Recv ()))
{
m_pktsTotal++;
}