diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-04-01 20:58:27 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-04-01 21:24:45 +0100 |
commit | 086969277e74d8ba065bf8145d3aeb0dec0bfee5 (patch) | |
tree | 02b3699a66735ef806d9b46353491f18f8e4e7b4 /Userland/Libraries/LibC/strings.cpp | |
parent | 0376c127f6e98e03607700d0b3f5154b7014b2f8 (diff) | |
download | serenity-086969277e74d8ba065bf8145d3aeb0dec0bfee5.zip |
Everywhere: Run clang-format
Diffstat (limited to 'Userland/Libraries/LibC/strings.cpp')
-rw-r--r-- | Userland/Libraries/LibC/strings.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibC/strings.cpp b/Userland/Libraries/LibC/strings.cpp index 4f0d49c92a..0937cc2e1a 100644 --- a/Userland/Libraries/LibC/strings.cpp +++ b/Userland/Libraries/LibC/strings.cpp @@ -16,7 +16,7 @@ void bzero(void* dest, size_t n) memset(dest, 0, n); } -void bcopy(const void* src, void* dest, size_t n) +void bcopy(void const* src, void* dest, size_t n) { memmove(dest, src, n); } @@ -29,23 +29,23 @@ static char foldcase(char ch) } // https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html -int strcasecmp(const char* s1, const char* s2) +int strcasecmp(char const* s1, char const* s2) { for (; foldcase(*s1) == foldcase(*s2); ++s1, ++s2) { if (*s1 == 0) return 0; } - return foldcase(*(const unsigned char*)s1) < foldcase(*(const unsigned char*)s2) ? -1 : 1; + return foldcase(*(unsigned char const*)s1) < foldcase(*(unsigned char const*)s2) ? -1 : 1; } // https://pubs.opengroup.org/onlinepubs/9699919799/functions/strncasecmp.html -int strncasecmp(const char* s1, const char* s2, size_t n) +int strncasecmp(char const* s1, char const* s2, size_t n) { if (!n) return 0; do { if (foldcase(*s1) != foldcase(*s2++)) - return foldcase(*(const unsigned char*)s1) - foldcase(*(const unsigned char*)--s2); + return foldcase(*(unsigned char const*)s1) - foldcase(*(unsigned char const*)--s2); if (*s1++ == 0) break; } while (--n); |