Skip to content

Commit

Permalink
ci(pre-commit): Apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Nov 12, 2024
1 parent 2fee252 commit 786d831
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cores/esp32/IPAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void IPAddress::to_ip_addr_t(ip_addr_t *addr) const {
addr->u_addr.ip4.addr = _address.dword[IPADDRESS_V4_DWORD_INDEX];
}
#else
addr->addr = _address.dword[IPADDRESS_V4_DWORD_INDEX];
addr->addr = _address.dword[IPADDRESS_V4_DWORD_INDEX];
#endif
}

Expand All @@ -428,7 +428,7 @@ IPAddress &IPAddress::from_ip_addr_t(const ip_addr_t *addr) {
#if CONFIG_LWIP_IPV6
_address.dword[IPADDRESS_V4_DWORD_INDEX] = addr->u_addr.ip4.addr;
#else
_address.dword[IPADDRESS_V4_DWORD_INDEX] = addr->addr;
_address.dword[IPADDRESS_V4_DWORD_INDEX] = addr->addr;
#endif
#if CONFIG_LWIP_IPV6
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/AsyncUDP/src/AsyncUDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ AsyncUDPPacket::AsyncUDPPacket(AsyncUDP *udp, pbuf *pb, const ip_addr_t *raddr,
_localIp.u_addr.ip4.addr = iphdr->dest.addr;
_remoteIp.u_addr.ip4.addr = iphdr->src.addr;
#else
_localIp.addr = iphdr->dest.addr;
_remoteIp.addr = iphdr->src.addr;
_localIp.addr = iphdr->dest.addr;
_remoteIp.addr = iphdr->src.addr;
#endif
#if CONFIG_LWIP_IPV6
} else {
Expand Down
8 changes: 4 additions & 4 deletions libraries/Network/src/NetworkServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ bool NetworkServer::hasClient() {
return true;
}
#if CONFIG_LWIP_IPV6
struct sockaddr_in6 _client;
int cs = sizeof(struct sockaddr_in6);
struct sockaddr_in6 _client;
int cs = sizeof(struct sockaddr_in6);
#else
struct sockaddr _client;
int cs = sizeof(struct sockaddr);
struct sockaddr _client;
int cs = sizeof(struct sockaddr);
#endif
#ifdef ESP_IDF_VERSION_MAJOR
_accepted_sockfd = lwip_accept(sockfd, (struct sockaddr *)&_client, (socklen_t *)&cs);
Expand Down
3 changes: 1 addition & 2 deletions libraries/Network/src/NetworkUdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ int NetworkUDP::parsePacket() {
remote_ip.from_ip_addr_t(&addr);
}
remote_port = ntohs(si_other.sin6_port);
}
else {
} else {
remote_ip = ip_addr_any.u_addr.ip4.addr;
remote_port = 0;
}
Expand Down

0 comments on commit 786d831

Please sign in to comment.