From 4cd6f439fb23499c250a60ba63d3c328060b1c28 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 28 Oct 2021 15:09:49 +0000 Subject: [PATCH] Restyled by clang-format --- src/inet/UDPEndPoint.cpp | 12 ++++++------ src/inet/UDPEndPoint.h | 4 +--- src/inet/tests/TestInetLayerCommon.cpp | 6 ++---- src/inet/tests/TestInetLayerCommon.hpp | 3 +-- src/inet/tests/TestInetLayerMulticast.cpp | 2 +- src/transport/raw/UDP.h | 2 +- 6 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/inet/UDPEndPoint.cpp b/src/inet/UDPEndPoint.cpp index f8e93f900dffce..7fe265f8d6a51c 100644 --- a/src/inet/UDPEndPoint.cpp +++ b/src/inet/UDPEndPoint.cpp @@ -34,8 +34,8 @@ #include #include -#include #include +#include #include #if CHIP_SYSTEM_CONFIG_USE_LWIP @@ -72,7 +72,7 @@ // as well as group communication. #undef HAVE_IPV6_MULTICAST #endif -#endif // CHIP_SYSTEM_CONFIG_USE_LWIP +#endif // CHIP_SYSTEM_CONFIG_USE_LWIP #if CHIP_SYSTEM_CONFIG_USE_SOCKETS #if HAVE_SYS_SOCKET_H @@ -580,13 +580,13 @@ void UDPEndPoint::LwIPReceiveUDPMessage(void * arg, struct udp_pcb * pcb, struct #else // LWIP_VERSION_MAJOR <= 1 if (PCB_ISIPV6(pcb)) { - pktInfo->SrcAddress = IPAddress(*(ip6_addr_t *) addr); + pktInfo->SrcAddress = IPAddress(*(ip6_addr_t *) addr); pktInfo->DestAddress = IPAddress(*ip6_current_dest_addr()); } #if INET_CONFIG_ENABLE_IPV4 else { - pktInfo->SrcAddress = IPAddress(*addr); + pktInfo->SrcAddress = IPAddress(*addr); pktInfo->DestAddress = IPAddress(*ip_current_dest_addr()); } #endif // INET_CONFIG_ENABLE_IPV4 @@ -1533,7 +1533,7 @@ CHIP_ERROR UDPEndPoint::BindImpl(IPAddressType addrType, const IPAddress & addr, } CHIP_ERROR UDPEndPoint::IpBind(IPAddressType aAddressType, const IPAddress & aAddress, uint16_t aPort, - const nw_parameters_t & aParameters) + const nw_parameters_t & aParameters) { nw_endpoint_t endpoint = nullptr; @@ -1751,7 +1751,7 @@ void UDPEndPoint::GetPacketInfo(const nw_connection_t & aConnection, IPPacketInf } CHIP_ERROR UDPEndPoint::GetEndPoint(nw_endpoint_t & aEndPoint, const IPAddressType aAddressType, const IPAddress & aAddress, - uint16_t aPort) + uint16_t aPort) { char addrStr[INET6_ADDRSTRLEN]; char portStr[INET_PORTSTRLEN]; diff --git a/src/inet/UDPEndPoint.h b/src/inet/UDPEndPoint.h index 7065c85160c349..0c96aabe330867 100644 --- a/src/inet/UDPEndPoint.h +++ b/src/inet/UDPEndPoint.h @@ -29,8 +29,8 @@ #pragma once #include -#include #include +#include #include @@ -281,8 +281,6 @@ class DLL_EXPORT UDPEndPoint : public EndPointBasis // XXX Temporary: end of import from IPEndPointBasis - - UDPEndPoint(const UDPEndPoint &) = delete; static chip::System::ObjectPool sPool; diff --git a/src/inet/tests/TestInetLayerCommon.cpp b/src/inet/tests/TestInetLayerCommon.cpp index 21e2119c26bd76..a81916dfc60829 100644 --- a/src/inet/tests/TestInetLayerCommon.cpp +++ b/src/inet/tests/TestInetLayerCommon.cpp @@ -349,8 +349,7 @@ void HandleSendTimerComplete(System::Layer * aSystemLayer, void * aAppState) // Raw Endpoint Callback Handlers -void HandleRawMessageReceived(const UDPEndPoint * aEndPoint, const PacketBufferHandle & aBuffer, - const IPPacketInfo * aPacketInfo) +void HandleRawMessageReceived(const UDPEndPoint * aEndPoint, const PacketBufferHandle & aBuffer, const IPPacketInfo * aPacketInfo) { char lSourceAddressBuffer[INET6_ADDRSTRLEN]; char lDestinationAddressBuffer[INET6_ADDRSTRLEN]; @@ -380,8 +379,7 @@ void HandleRawReceiveError(const UDPEndPoint * aEndPoint, const CHIP_ERROR & aEr // UDP Endpoint Callback Handlers -void HandleUDPMessageReceived(const UDPEndPoint * aEndPoint, const PacketBufferHandle & aBuffer, - const IPPacketInfo * aPacketInfo) +void HandleUDPMessageReceived(const UDPEndPoint * aEndPoint, const PacketBufferHandle & aBuffer, const IPPacketInfo * aPacketInfo) { char lSourceAddressBuffer[INET6_ADDRSTRLEN]; char lDestinationAddressBuffer[INET6_ADDRSTRLEN]; diff --git a/src/inet/tests/TestInetLayerCommon.hpp b/src/inet/tests/TestInetLayerCommon.hpp index b3892bb4e0068c..0d649ed4904832 100644 --- a/src/inet/tests/TestInetLayerCommon.hpp +++ b/src/inet/tests/TestInetLayerCommon.hpp @@ -146,8 +146,7 @@ extern void HandleSendTimerComplete(chip::System::Layer * aSystemLayer, void * a // UDP Endpoint Callback Handlers -extern void HandleUDPMessageReceived(const chip::Inet::UDPEndPoint * aEndPoint, - const chip::System::PacketBufferHandle & aBuffer, +extern void HandleUDPMessageReceived(const chip::Inet::UDPEndPoint * aEndPoint, const chip::System::PacketBufferHandle & aBuffer, const chip::Inet::IPPacketInfo * aPacketInfo); extern void HandleUDPReceiveError(const chip::Inet::UDPEndPoint * aEndPoint, const CHIP_ERROR & aError, const chip::Inet::IPPacketInfo * aPacketInfo); diff --git a/src/inet/tests/TestInetLayerMulticast.cpp b/src/inet/tests/TestInetLayerMulticast.cpp index bf10fac986f7e3..cbde782f5b4a7f 100644 --- a/src/inet/tests/TestInetLayerMulticast.cpp +++ b/src/inet/tests/TestInetLayerMulticast.cpp @@ -719,7 +719,7 @@ static void StartTest() IPAddressType lIPAddressType = IPAddressType::kIPv6; IPVersion lIPVersion = kIPVersion_6; IPAddress lAddress = IPAddress::Any; - UDPEndPoint * lEndPoint = nullptr; + UDPEndPoint * lEndPoint = nullptr; const bool lUseLoopback = ((gOptFlags & kOptFlagNoLoopback) == 0); CHIP_ERROR lStatus; diff --git a/src/transport/raw/UDP.h b/src/transport/raw/UDP.h index 8bbf08515418a8..5cc04166b29d9a 100644 --- a/src/transport/raw/UDP.h +++ b/src/transport/raw/UDP.h @@ -28,8 +28,8 @@ #include #include -#include #include +#include #include #include