summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2008-10-19 09:10:44 +0000
committerdelphij <delphij@FreeBSD.org>2008-10-19 09:10:44 +0000
commit84a6bd24eef8bb1dca2f8d1f09971190cb9acfcb (patch)
treec607e2dcadb69b178b2953f89e0f7ff5d97aec32 /lib/libc
parentf0bd6304a2f45313e77bf94ca25c84270c3d4c8d (diff)
downloadFreeBSD-src-84a6bd24eef8bb1dca2f8d1f09971190cb9acfcb.zip
FreeBSD-src-84a6bd24eef8bb1dca2f8d1f09971190cb9acfcb.tar.gz
Further simplify the code.
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/strxfrm.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c
index cce6c0f..a4c8019 100644
--- a/lib/libc/string/strxfrm.c
+++ b/lib/libc/string/strxfrm.c
@@ -45,17 +45,8 @@ strxfrm(char * __restrict dest, const char * __restrict src, size_t len)
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;
OpenPOWER on IntegriCloud