1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:57:46 +00:00

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -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);