From 1a0f209cfd821f64e74ddeadf9da026329d2f435 Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Fri, 16 Feb 2024 18:30:14 +0200 Subject: [PATCH] [#3230] addressed review --- src/lib/dhcp/pkt_filter_inet.cc | 6 +++--- src/lib/dhcp/pkt_filter_inet6.cc | 4 ++-- src/lib/dhcp/pkt_filter_lpf.cc | 4 ++-- src/lib/dhcp/tests/pkt_filter6_test_utils.h | 4 ++-- src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc | 2 +- src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc | 2 +- src/lib/dhcp/tests/pkt_filter_inet_unittest.cc | 2 +- src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc | 2 +- src/lib/dhcp/tests/pkt_filter_test_utils.h | 4 ++-- src/lib/dhcp/testutils/pkt_filter_test_stub.cc | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/lib/dhcp/pkt_filter_inet.cc b/src/lib/dhcp/pkt_filter_inet.cc index 6f46e2ea03..5972a4de58 100644 --- a/src/lib/dhcp/pkt_filter_inet.cc +++ b/src/lib/dhcp/pkt_filter_inet.cc @@ -22,11 +22,11 @@ const size_t PktFilterInet::CONTROL_BUF_LEN = 512; bool PktFilterInet::isSocketReceivedTimeSupported() const { #ifdef SO_TIMESTAMP - return (true); + return (true); #else - return (false); + return (false); #endif -} +} SocketInfo PktFilterInet::openSocket(Iface& iface, diff --git a/src/lib/dhcp/pkt_filter_inet6.cc b/src/lib/dhcp/pkt_filter_inet6.cc index 917e9b6382..98ea732c29 100644 --- a/src/lib/dhcp/pkt_filter_inet6.cc +++ b/src/lib/dhcp/pkt_filter_inet6.cc @@ -25,9 +25,9 @@ const size_t PktFilterInet6::CONTROL_BUF_LEN = 512; bool PktFilterInet6::isSocketReceivedTimeSupported() const { #ifdef SO_TIMESTAMP - return (true); + return (true); #else - return (false); + return (false); #endif } diff --git a/src/lib/dhcp/pkt_filter_lpf.cc b/src/lib/dhcp/pkt_filter_lpf.cc index 82160f1317..f0f19e946a 100644 --- a/src/lib/dhcp/pkt_filter_lpf.cc +++ b/src/lib/dhcp/pkt_filter_lpf.cc @@ -131,9 +131,9 @@ namespace dhcp { bool PktFilterLPF::isSocketReceivedTimeSupported() const { #ifdef SO_TIMESTAMP - return (true); + return (true); #else - return (false); + return (false); #endif } diff --git a/src/lib/dhcp/tests/pkt_filter6_test_utils.h b/src/lib/dhcp/tests/pkt_filter6_test_utils.h index a2e06205e8..a4437f7689 100644 --- a/src/lib/dhcp/tests/pkt_filter6_test_utils.h +++ b/src/lib/dhcp/tests/pkt_filter6_test_utils.h @@ -76,8 +76,8 @@ class PktFilter6Test : public ::testing::Test { /// @brief Checks that a received message has the appropriate events /// in it's event stack. /// - /// @param rcvd_msg An instance of the message to be tested. - /// @param so_time_supported If true the event stack should have with + /// @param msg An instance of the message to be tested. + /// @param so_time_supported If true the event stack should have /// a SOCKET_RECEIVED event followed by a BUFFER_READ event, if false /// it should have only the latter. void testReceivedPktEvents(const PktPtr& msg, bool so_time_supported) const; diff --git a/src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc b/src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc index 83edf9ace4..05c683396d 100644 --- a/src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc +++ b/src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc @@ -205,7 +205,7 @@ TEST_F(PktFilterBPFTest, receive) { testRcvdMessageAddressPort(rcvd_pkt); // Verify that the packet event stack is as expected. - testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported()); + testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported()); } // This test verifies that if the packet is received over the raw diff --git a/src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc b/src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc index 62636c178d..9688c5cfc1 100644 --- a/src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc +++ b/src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc @@ -145,7 +145,7 @@ TEST_F(PktFilterInet6Test, receive) { testRcvdMessage(rcvd_pkt); // Verify that the packet event stack is as expected. - testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported()); + testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported()); } } // anonymous namespace diff --git a/src/lib/dhcp/tests/pkt_filter_inet_unittest.cc b/src/lib/dhcp/tests/pkt_filter_inet_unittest.cc index f9dbc66cd8..a83f5431cd 100644 --- a/src/lib/dhcp/tests/pkt_filter_inet_unittest.cc +++ b/src/lib/dhcp/tests/pkt_filter_inet_unittest.cc @@ -160,7 +160,7 @@ TEST_F(PktFilterInetTest, receive) { testRcvdMessageAddressPort(rcvd_pkt); // Verify that the packet event stack is as expected. - testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported()); + testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported()); } } // anonymous namespace diff --git a/src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc b/src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc index 56d6f72297..f5952c0e77 100644 --- a/src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc +++ b/src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc @@ -196,7 +196,7 @@ TEST_F(PktFilterLPFTest, receive) { testRcvdMessageAddressPort(rcvd_pkt); // Verify that the packet event stack is as expected. - testReceivedPktEvents (rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported()); + testReceivedPktEvents(rcvd_pkt, pkt_filter.isSocketReceivedTimeSupported()); } // This test verifies that if the packet is received over the raw diff --git a/src/lib/dhcp/tests/pkt_filter_test_utils.h b/src/lib/dhcp/tests/pkt_filter_test_utils.h index ef7574e6b4..ed2300ba62 100644 --- a/src/lib/dhcp/tests/pkt_filter_test_utils.h +++ b/src/lib/dhcp/tests/pkt_filter_test_utils.h @@ -85,8 +85,8 @@ class PktFilterTest : public ::testing::Test { /// @brief Checks that a received message has the appropriate events /// in it's event stack. /// - /// @param rcvd_msg An instance of the message to be tested. - /// @param so_time_supported If true the event stack should have with + /// @param msg An instance of the message to be tested. + /// @param so_time_supported If true the event stack should have /// a SOCKET_RECEIVED event followed by a BUFFER_READ event, if false /// it should have only the latter. void testReceivedPktEvents(const PktPtr& msg, bool so_time_supported) const; diff --git a/src/lib/dhcp/testutils/pkt_filter_test_stub.cc b/src/lib/dhcp/testutils/pkt_filter_test_stub.cc index 2cc511e240..ae64370e0d 100644 --- a/src/lib/dhcp/testutils/pkt_filter_test_stub.cc +++ b/src/lib/dhcp/testutils/pkt_filter_test_stub.cc @@ -27,9 +27,9 @@ PktFilterTestStub::isDirectResponseSupported() const { bool PktFilterTestStub::isSocketReceivedTimeSupported() const { #ifdef SO_TIMESTAMP - return(true); + return (true); #else - return(false); + return (false); #endif }