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
move msghdr and cmsghdr out of bits/socket.h
[musl.git]
/
src
/
string
/
strncat.c
blob
01ca2a2317c6f29ecc1289e94b76b72c69698ea8
1
#include <string.h>
2
3
char
*
strncat
(
char
*
restrict d
,
const char
*
restrict s
,
size_t
n
)
4
{
5
char
*
a
=
d
;
6
d
+=
strlen
(
d
);
7
while
(
n
&& *
s
)
n
--, *
d
++ = *
s
++;
8
*
d
++ =
0
;
9
return
a
;
10
}