Simplify by removing unneeded local variables and explicit null termination.

This commit is contained in:
Tim J. Robbins 2002-09-26 09:28:55 +00:00
parent e2361b6f16
commit ce2a18008c

View File

@ -41,17 +41,13 @@ wcscat(s1, s2)
wchar_t * __restrict s1;
const wchar_t * __restrict s2;
{
wchar_t *p;
wchar_t *q;
const wchar_t *r;
wchar_t *cp;
p = s1;
while (*p)
p++;
q = p;
r = s2;
while (*r)
*q++ = *r++;
*q = '\0';
return s1;
cp = s1;
while (*cp != L'\0')
cp++;
while ((*cp++ = *s2++) != L'\0')
;
return (s1);
}