about summary refs log tree commit diff
path: root/wcsmbs/wcscat.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wcscat.c')
-rw-r--r--wcsmbs/wcscat.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/wcsmbs/wcscat.c b/wcsmbs/wcscat.c
index 6a25b20e31..1a9d667fda 100644
--- a/wcsmbs/wcscat.c
+++ b/wcsmbs/wcscat.c
@@ -26,26 +26,7 @@
 wchar_t *
 __wcscat (wchar_t *dest, const wchar_t *src)
 {
-  wchar_t *s1 = dest;
-  const wchar_t *s2 = src;
-  wchar_t c;
-
-  /* Find the end of the string.  */
-  do
-    c = *s1++;
-  while (c != L'\0');
-
-  /* Make S1 point before the next character, so we can increment
-     it while memory is read (wins on pipelined cpus).	*/
-  s1 -= 2;
-
-  do
-    {
-      c = *s2++;
-      *++s1 = c;
-    }
-  while (c != L'\0');
-
+  __wcscpy (dest + __wcslen (dest), src);
   return dest;
 }
 #ifndef WCSCAT