Simplify by removing unneeded local variables and explicit null termination.
This commit is contained in:
parent
e0a783a538
commit
9228738b8c
@ -41,17 +41,13 @@ wcscat(s1, s2)
|
|||||||
wchar_t * __restrict s1;
|
wchar_t * __restrict s1;
|
||||||
const wchar_t * __restrict s2;
|
const wchar_t * __restrict s2;
|
||||||
{
|
{
|
||||||
wchar_t *p;
|
wchar_t *cp;
|
||||||
wchar_t *q;
|
|
||||||
const wchar_t *r;
|
|
||||||
|
|
||||||
p = s1;
|
cp = s1;
|
||||||
while (*p)
|
while (*cp != L'\0')
|
||||||
p++;
|
cp++;
|
||||||
q = p;
|
while ((*cp++ = *s2++) != L'\0')
|
||||||
r = s2;
|
;
|
||||||
while (*r)
|
|
||||||
*q++ = *r++;
|
return (s1);
|
||||||
*q = '\0';
|
|
||||||
return s1;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user