diff options
Diffstat (limited to 'Kernel/Net/TCPSocket.cpp')
-rw-r--r-- | Kernel/Net/TCPSocket.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp index 5691627ecd..be9d9e4976 100644 --- a/Kernel/Net/TCPSocket.cpp +++ b/Kernel/Net/TCPSocket.cpp @@ -404,9 +404,9 @@ KResult TCPSocket::protocol_connect(FileDescription& description, ShouldBlock sh KResultOr<u16> TCPSocket::protocol_allocate_local_port() { - static const u16 first_ephemeral_port = 32768; - static const u16 last_ephemeral_port = 60999; - static const u16 ephemeral_port_range_size = last_ephemeral_port - first_ephemeral_port; + constexpr u16 first_ephemeral_port = 32768; + constexpr u16 last_ephemeral_port = 60999; + constexpr u16 ephemeral_port_range_size = last_ephemeral_port - first_ephemeral_port; u16 first_scan_port = first_ephemeral_port + get_good_random<u16>() % ephemeral_port_range_size; Locker locker(sockets_by_tuple().lock()); |