summaryrefslogtreecommitdiff
path: root/runtime
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
commit68172da05524b1b0d2234dd364205369f0859b5b (patch)
tree01bb495c18b5d3295a8f79c308d4822c3cf86f22 /runtime
parentb5ee509be2ce78badc11fd649dda90ec78394d1a (diff)
downloadllvm-68172da05524b1b0d2234dd364205369f0859b5b.tar.gz
llvm-68172da05524b1b0d2234dd364205369f0859b5b.tar.bz2
llvm-68172da05524b1b0d2234dd364205369f0859b5b.tar.xz
Fix strcpy implementation and trie
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/GCCLibraries/libc/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/GCCLibraries/libc/string.c b/runtime/GCCLibraries/libc/string.c
index bc262a5f4c..0ed4ced64c 100644
--- a/runtime/GCCLibraries/libc/string.c
+++ b/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) {