summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/stdlib.cpp6
-rw-r--r--Userland/Libraries/LibC/string.cpp4
-rw-r--r--Userland/Libraries/LibC/wchar.cpp10
3 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Libraries/LibC/stdlib.cpp b/Userland/Libraries/LibC/stdlib.cpp
index 293e2ca77a..cd4db3b5d6 100644
--- a/Userland/Libraries/LibC/stdlib.cpp
+++ b/Userland/Libraries/LibC/stdlib.cpp
@@ -874,15 +874,15 @@ int wctomb(char*, wchar_t)
size_t wcstombs(char* dest, const wchar_t* src, size_t max)
{
- char* originalDest = dest;
- while ((size_t)(dest - originalDest) < max) {
+ char* original_dest = dest;
+ while ((size_t)(dest - original_dest) < max) {
StringView v { (const char*)src, sizeof(wchar_t) };
// FIXME: dependent on locale, for now utf-8 is supported.
Utf8View utf8 { v };
if (*utf8.begin() == '\0') {
*dest = '\0';
- return (size_t)(dest - originalDest); // Exclude null character in returned size
+ return (size_t)(dest - original_dest); // Exclude null character in returned size
}
for (auto byte : utf8) {
diff --git a/Userland/Libraries/LibC/string.cpp b/Userland/Libraries/LibC/string.cpp
index 3915f691f6..24ecc43007 100644
--- a/Userland/Libraries/LibC/string.cpp
+++ b/Userland/Libraries/LibC/string.cpp
@@ -182,10 +182,10 @@ const void* memmem(const void* haystack, size_t haystack_length, const void* nee
char* strcpy(char* dest, const char* src)
{
- char* originalDest = dest;
+ char* original_dest = dest;
while ((*dest++ = *src++) != '\0')
;
- return originalDest;
+ return original_dest;
}
char* strncpy(char* dest, const char* src, size_t n)
diff --git a/Userland/Libraries/LibC/wchar.cpp b/Userland/Libraries/LibC/wchar.cpp
index 12581e4755..56eeaa8fa9 100644
--- a/Userland/Libraries/LibC/wchar.cpp
+++ b/Userland/Libraries/LibC/wchar.cpp
@@ -20,18 +20,18 @@ size_t wcslen(const wchar_t* str)
wchar_t* wcscpy(wchar_t* dest, const wchar_t* src)
{
- wchar_t* originalDest = dest;
+ wchar_t* original_dest = dest;
while ((*dest++ = *src++) != '\0')
;
- return originalDest;
+ return original_dest;
}
wchar_t* wcsncpy(wchar_t* dest, const wchar_t* src, size_t num)
{
- wchar_t* originalDest = dest;
- while (((*dest++ = *src++) != '\0') && ((size_t)(dest - originalDest) < num))
+ wchar_t* original_dest = dest;
+ while (((*dest++ = *src++) != '\0') && ((size_t)(dest - original_dest) < num))
;
- return originalDest;
+ return original_dest;
}
int wcscmp(const wchar_t* s1, const wchar_t* s2)