repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix possible fd leak, unrestored cancellation state on dns socket fail
[musl.git]
/
src
/
string
/
strcpy.c
blob
f7e3ba38c16e3e69395f85dcdd6c23bb20797a6c
1
#include <string.h>
2
3
char
*
__stpcpy
(
char
*,
const char
*);
4
5
char
*
strcpy
(
char
*
restrict dest
,
const char
*
restrict src
)
6
{
7
#if 1
8
__stpcpy
(
dest
,
src
);
9
return
dest
;
10
#else
11
const unsigned char
*
s
=
src
;
12
unsigned char
*
d
=
dest
;
13
while
((*
d
++ = *
s
++));
14
return
dest
;
15
#endif
16
}