Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and andy31415 committed Oct 28, 2021
1 parent 0be7d39 commit 4cd6f43
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 17 deletions.
12 changes: 6 additions & 6 deletions src/inet/UDPEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include <inet/InetLayer.h>

#include <lib/support/CodeUtils.h>
#include <lib/support/logging/CHIPLogging.h>
#include <lib/support/SafeInt.h>
#include <lib/support/logging/CHIPLogging.h>
#include <system/SystemFaultInjection.h>

#if CHIP_SYSTEM_CONFIG_USE_LWIP
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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];
Expand Down
4 changes: 1 addition & 3 deletions src/inet/UDPEndPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#pragma once

#include <inet/EndPointBasis.h>
#include <inet/InetInterface.h>
#include <inet/IPAddress.h>
#include <inet/InetInterface.h>

#include <system/SystemPacketBuffer.h>

Expand Down Expand Up @@ -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<UDPEndPoint, INET_CONFIG_NUM_UDP_ENDPOINTS> sPool;
Expand Down
6 changes: 2 additions & 4 deletions src/inet/tests/TestInetLayerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down
3 changes: 1 addition & 2 deletions src/inet/tests/TestInetLayerCommon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/inet/tests/TestInetLayerMulticast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/transport/raw/UDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include <utility>

#include <inet/IPAddress.h>
#include <inet/UDPEndPoint.h>
#include <inet/InetInterface.h>
#include <inet/UDPEndPoint.h>
#include <lib/core/CHIPCore.h>
#include <transport/raw/Base.h>

Expand Down

0 comments on commit 4cd6f43

Please sign in to comment.