diff options
Diffstat (limited to 'Kernel/Net/UDPSocket.cpp')
-rw-r--r-- | Kernel/Net/UDPSocket.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Net/UDPSocket.cpp b/Kernel/Net/UDPSocket.cpp index 36f95b400c..9c81322e70 100644 --- a/Kernel/Net/UDPSocket.cpp +++ b/Kernel/Net/UDPSocket.cpp @@ -103,9 +103,9 @@ KResult UDPSocket::protocol_connect(FileDescription&, ShouldBlock) KResultOr<u16> UDPSocket::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_port().lock()); |