Skip to content

Commit

Permalink
[#3207] Format the code
Browse files Browse the repository at this point in the history
  • Loading branch information
fivitti committed Feb 20, 2024
1 parent e767fca commit 2e02b32
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/bin/perfdhcp/test_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TestControl::haveAllPacketsBeenReceived() const {
const size_t& num_request_size = num_request.size();

if (num_request_size == 0) {
return false;
return (false);
}

uint32_t responses = 0;
Expand Down Expand Up @@ -365,7 +365,7 @@ TestControl::generateMacAddress(uint8_t& randomized) {
if (r >= macs.size()) {
r = 0;
}
return macs[r];
return (macs[r]);

} else {
// ... otherwise use the standard behavior
Expand Down Expand Up @@ -932,9 +932,9 @@ TestControl::validateIA(const Pkt6Ptr& pkt6) {
if ((address_and_prefix && iapref && iaaddr) ||
(prefix_only && iapref && !address_and_prefix) ||
(address_only && iaaddr && !address_and_prefix)) {
return true;
return (true);
} else {
return false;
return (false);
}
}

Expand Down Expand Up @@ -1109,11 +1109,8 @@ TestControl::TestControl(CommandOptions& options, BasePerfSocket &socket) :
socket_(socket),
receiver_(socket, options.isSingleThreaded(), options.getIpVersion()),
stats_mgr_(options),
random_generator_(NumberGeneratorPtr(
new RandomGenerator(0, options.getMacsFromFile().size())
)),
options_(options)
{
random_generator_(new RandomGenerator(0, options.getMacsFromFile().size())),
options_(options) {
// Reset singleton state before test starts.
reset();

Expand Down Expand Up @@ -1892,7 +1889,7 @@ static OptionBuffer const concatenateBuffers(OptionBuffer const& a,
OptionBuffer result;
result.insert(result.end(), a.begin(), a.end());
result.insert(result.end(), b.begin(), b.end());
return result;
return (result);
}

static void mergeOptionIntoPacket(Pkt4Ptr const& packet,
Expand Down

0 comments on commit 2e02b32

Please sign in to comment.