summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-21 17:53:16 +0000
committerChris Lattner <sabre@nondot.org>2003-10-21 17:53:16 +0000
commit5382729e0cfd45db23ea7472719f31ccfe104ef6 (patch)
treeaa73038dae667bc37ae552c1a65d3aeeb87c45f9 /llvm
parent9a0bdb1aca72592c3695c50158f758fce3839fb5 (diff)
downloadbcm5719-llvm-5382729e0cfd45db23ea7472719f31ccfe104ef6.tar.gz
bcm5719-llvm-5382729e0cfd45db23ea7472719f31ccfe104ef6.zip
Fix strcpy implementation and trie
llvm-svn: 9338
Diffstat (limited to 'llvm')
-rw-r--r--llvm/runtime/GCCLibraries/libc/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/runtime/GCCLibraries/libc/string.c b/llvm/runtime/GCCLibraries/libc/string.c
index bc262a5f4ce..0ed4ced64c4 100644
--- a/llvm/runtime/GCCLibraries/libc/string.c
+++ b/llvm/runtime/GCCLibraries/libc/string.c
@@ -23,8 +23,9 @@ char *strdup(const char *str) {
}
char *strcpy(char *s1, const char *s2) {
+ char *dest = s1;
while ((*s1++ = *s2++));
- return s1;
+ return dest;
}
char *strcat(char *s1, const char *s2) {
OpenPOWER on IntegriCloud