Add parenthesis in while (packet = socket->Recv ()) to make clang++ (LLVM) happy
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 22 Feb 2012 13:58:51 +0000
changeset 7736 d3c1e0eab341
parent 7735 6d1644e49499
child 7737 0f35472c9d4d
Add parenthesis in while (packet = socket->Recv ()) to make clang++ (LLVM) happy
src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc
src/spectrum/examples/adhoc-aloha-ideal-phy.cc
src/test/global-routing-test-suite.cc
src/uan/examples/uan-cw-example.cc
src/uan/examples/uan-rc-example.cc
--- a/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc	Wed Feb 22 13:56:44 2012 +0000
+++ b/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc	Wed Feb 22 13:58:51 2012 +0000
@@ -102,7 +102,7 @@
 {
   Ptr<Packet> packet;
   uint64_t bytes = 0;
-  while (packet = socket->Recv ())
+  while ((packet = socket->Recv ()))
     {
       bytes += packet->GetSize ();
     }
--- a/src/spectrum/examples/adhoc-aloha-ideal-phy.cc	Wed Feb 22 13:56:44 2012 +0000
+++ b/src/spectrum/examples/adhoc-aloha-ideal-phy.cc	Wed Feb 22 13:58:51 2012 +0000
@@ -97,7 +97,7 @@
 {
   Ptr<Packet> packet;
   uint64_t bytes = 0;
-  while (packet = socket->Recv ())
+  while ((packet = socket->Recv ()))
     {
       bytes += packet->GetSize ();
     }
--- a/src/test/global-routing-test-suite.cc	Wed Feb 22 13:56:44 2012 +0000
+++ b/src/test/global-routing-test-suite.cc	Wed Feb 22 13:58:51 2012 +0000
@@ -93,7 +93,7 @@
 {
   Ptr<Packet> packet;
   Address from;
-  while (packet = socket->RecvFrom (from))
+  while ((packet = socket->RecvFrom (from)))
     {
       if (packet->GetSize () == 0)
         { //EOF
--- a/src/uan/examples/uan-cw-example.cc	Wed Feb 22 13:56:44 2012 +0000
+++ b/src/uan/examples/uan-cw-example.cc	Wed Feb 22 13:58:51 2012 +0000
@@ -115,7 +115,7 @@
 {
   Ptr<Packet> packet;
 
-  while (packet = socket->Recv ())
+  while ((packet = socket->Recv ()))
     {
       m_bytesTotal += packet->GetSize ();
     }
--- a/src/uan/examples/uan-rc-example.cc	Wed Feb 22 13:56:44 2012 +0000
+++ b/src/uan/examples/uan-rc-example.cc	Wed Feb 22 13:58:51 2012 +0000
@@ -89,7 +89,7 @@
 Experiment::ReceivePacket (Ptr<Socket> socket)
 {
   Ptr<Packet> packet;
-  while (packet = socket->Recv ())
+  while ((packet = socket->Recv ()))
     {
       m_bytesTotal += packet->GetSize ();
     }