svn commit: r184055 - head/lib/libc/string
Xin LI
delphij at FreeBSD.org
Sun Oct 19 09:10:45 UTC 2008
Author: delphij
Date: Sun Oct 19 09:10:44 2008
New Revision: 184055
URL: http://svn.freebsd.org/changeset/base/184055
Log:
Further simplify the code.
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
Modified:
head/lib/libc/string/strxfrm.c
Modified: head/lib/libc/string/strxfrm.c
==============================================================================
--- head/lib/libc/string/strxfrm.c Sun Oct 19 09:08:59 2008 (r184054)
+++ head/lib/libc/string/strxfrm.c Sun Oct 19 09:10:44 2008 (r184055)
@@ -45,17 +45,8 @@ strxfrm(char * __restrict dest, const ch
return 0;
}
- if (__collate_load_error) {
- slen = strlen(src);
- if (len > 0) {
- if (slen < len)
- strcpy(dest, src);
- else {
- strlcpy(dest, src, len);
- }
- }
- return slen;
- }
+ if (__collate_load_error)
+ return strlcpy(dest, src, len);
slen = 0;
prim = sec = 0;
More information about the svn-src-all
mailing list