--- 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 ();
}