summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/arpa/inet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibC/arpa/inet.cpp')
-rw-r--r--Userland/Libraries/LibC/arpa/inet.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibC/arpa/inet.cpp b/Userland/Libraries/LibC/arpa/inet.cpp
index ca669086af..86c6f307a6 100644
--- a/Userland/Libraries/LibC/arpa/inet.cpp
+++ b/Userland/Libraries/LibC/arpa/inet.cpp
@@ -12,16 +12,16 @@
extern "C" {
-const char* inet_ntop(int af, const void* src, char* dst, socklen_t len)
+char const* inet_ntop(int af, void const* src, char* dst, socklen_t len)
{
if (af == AF_INET) {
if (len < INET_ADDRSTRLEN) {
errno = ENOSPC;
return nullptr;
}
- auto* bytes = (const unsigned char*)src;
+ auto* bytes = (unsigned char const*)src;
snprintf(dst, len, "%u.%u.%u.%u", bytes[0], bytes[1], bytes[2], bytes[3]);
- return (const char*)dst;
+ return (char const*)dst;
} else if (af == AF_INET6) {
if (len < INET6_ADDRSTRLEN) {
errno = ENOSPC;
@@ -32,14 +32,14 @@ const char* inet_ntop(int af, const void* src, char* dst, socklen_t len)
errno = ENOSPC;
return nullptr;
}
- return (const char*)dst;
+ return (char const*)dst;
}
errno = EAFNOSUPPORT;
return nullptr;
}
-int inet_pton(int af, const char* src, void* dst)
+int inet_pton(int af, char const* src, void* dst)
{
if (af == AF_INET) {
unsigned a, b, c, d;
@@ -78,7 +78,7 @@ int inet_pton(int af, const char* src, void* dst)
return -1;
}
-in_addr_t inet_addr(const char* str)
+in_addr_t inet_addr(char const* str)
{
in_addr_t tmp {};
int rc = inet_pton(AF_INET, str, &tmp);