summaryrefslogtreecommitdiff
path: root/drivers/unix/net_socket_posix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/unix/net_socket_posix.cpp')
-rw-r--r--drivers/unix/net_socket_posix.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp
index 222aef998c..e01c6a0e0f 100644
--- a/drivers/unix/net_socket_posix.cpp
+++ b/drivers/unix/net_socket_posix.cpp
@@ -269,11 +269,11 @@ _FORCE_INLINE_ Error NetSocketPosix::_change_multicast_group(IPAddress p_ip, Str
break; // IPv6 uses index.
}
- for (List<IPAddress>::Element *F = c.ip_addresses.front(); F; F = F->next()) {
- if (!F->get().is_ipv4()) {
+ for (const IPAddress &F : c.ip_addresses) {
+ if (!F.is_ipv4()) {
continue; // Wrong IP type
}
- if_ip = F->get();
+ if_ip = F;
break;
}
break;
@@ -466,7 +466,7 @@ Error NetSocketPosix::poll(PollType p_type, int p_timeout) const {
FD_ZERO(&ex);
FD_SET(_sock, &ex);
struct timeval timeout = { p_timeout / 1000, (p_timeout % 1000) * 1000 };
- // For blocking operation, pass nullptr timeout pointer to select.
+ // For blocking operation, pass nullptr timeout pointer to select.
struct timeval *tp = nullptr;
if (p_timeout >= 0) {
// If timeout is non-negative, we want to specify the timeout instead.