Fix clang-tidy readability-simplify-boolean-expr warnings
This commit is contained in:
@@ -214,7 +214,7 @@ main(int argc, char* argv[])
|
||||
outputValidated = false;
|
||||
}
|
||||
|
||||
if (outputValidated == false)
|
||||
if (!outputValidated)
|
||||
{
|
||||
std::cerr << "Program internal checking failed; returning with error" << std::endl;
|
||||
return (1);
|
||||
|
||||
@@ -746,7 +746,7 @@ main(int argc, char* argv[])
|
||||
firstTcpTypeId = TcpDctcp::GetTypeId();
|
||||
Config::SetDefault("ns3::CoDelQueueDisc::CeThreshold", TimeValue(ceThreshold));
|
||||
Config::SetDefault("ns3::FqCoDelQueueDisc::CeThreshold", TimeValue(ceThreshold));
|
||||
if (queueUseEcn == false)
|
||||
if (!queueUseEcn)
|
||||
{
|
||||
std::cout << "Warning: using DCTCP with queue ECN disabled" << std::endl;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ main(int argc, char* argv[])
|
||||
Address anyAddress;
|
||||
std::string probeType;
|
||||
std::string tracePath;
|
||||
if (useV6 == false)
|
||||
if (!useV6)
|
||||
{
|
||||
Ipv4AddressHelper address;
|
||||
address.SetBase("10.1.1.0", "255.255.255.0");
|
||||
|
||||
@@ -74,7 +74,7 @@ main(int argc, char* argv[])
|
||||
NetDeviceContainer d = csma.Install(n);
|
||||
|
||||
NS_LOG_INFO("Assign IP Addresses.");
|
||||
if (useV6 == false)
|
||||
if (!useV6)
|
||||
{
|
||||
Ipv4AddressHelper ipv4;
|
||||
ipv4.SetBase("10.1.1.0", "255.255.255.0");
|
||||
|
||||
@@ -73,7 +73,7 @@ main(int argc, char* argv[])
|
||||
NetDeviceContainer d = csma.Install(n);
|
||||
|
||||
NS_LOG_INFO("Assign IP Addresses.");
|
||||
if (useV6 == false)
|
||||
if (!useV6)
|
||||
{
|
||||
Ipv4AddressHelper ipv4;
|
||||
ipv4.SetBase("10.1.1.0", "255.255.255.0");
|
||||
|
||||
@@ -81,7 +81,7 @@ main(int argc, char* argv[])
|
||||
// We've got the "hardware" in place. Now we need to add IP addresses.
|
||||
//
|
||||
NS_LOG_INFO("Assign IP Addresses.");
|
||||
if (useV6 == false)
|
||||
if (!useV6)
|
||||
{
|
||||
Ipv4AddressHelper ipv4;
|
||||
ipv4.SetBase("10.1.1.0", "255.255.255.0");
|
||||
|
||||
@@ -414,7 +414,7 @@ main(int argc, char* argv[])
|
||||
// pcap trace on the application data sink
|
||||
wifiPhy.EnablePcap("mixed-wireless", appSink->GetId(), 0);
|
||||
|
||||
if (useCourseChangeCallback == true)
|
||||
if (useCourseChangeCallback)
|
||||
{
|
||||
Config::Connect("/NodeList/*/$ns3::MobilityModel/CourseChange",
|
||||
MakeCallback(&CourseChangeCallback));
|
||||
|
||||
@@ -255,7 +255,7 @@ main(int argc, char* argv[])
|
||||
InetSocketAddress remote = InetSocketAddress(i.GetAddress(sinkNode, 0), 80);
|
||||
source->Connect(remote);
|
||||
|
||||
if (tracing == true)
|
||||
if (tracing)
|
||||
{
|
||||
AsciiTraceHelper ascii;
|
||||
wifiPhy.EnableAsciiAll(ascii.CreateFileStream("wifi-simple-adhoc-grid.tr"));
|
||||
|
||||
Reference in New Issue
Block a user