diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-09-26 09:28:55 +0000 | 
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-09-26 09:28:55 +0000 | 
| commit | ce2a18008c9877654083a4f5b076d8b19a934bb0 (patch) | |
| tree | b4b51091d9e787c6f8cc63d55db76ccf12ddf722 /lib/libc/string/wcscat.c | |
| parent | e2361b6f168a9f8e07cfe495f856fa3d06a75d55 (diff) | |
Notes
Diffstat (limited to 'lib/libc/string/wcscat.c')
| -rw-r--r-- | lib/libc/string/wcscat.c | 20 | 
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/libc/string/wcscat.c b/lib/libc/string/wcscat.c index e12d8dfdf7c26..1c965335e4d2a 100644 --- a/lib/libc/string/wcscat.c +++ b/lib/libc/string/wcscat.c @@ -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);  }  | 
