Gitiles
Code Review
Sign In
android-review.linaro.org
/
platform
/
external
/
syslinux
/
refs/heads/oreo-m6-s2-release
/
.
/
com32
/
lib
/
strncpy.c
blob: 0eda791ecdf4371b449df4b09562f884992705c7 [
file
] [
log
] [
blame
]
/*
* strncpy.c
*
* strncpy()
*/
#include
<string.h>
char
*
strncpy
(
char
*
dst
,
const
char
*
src
,
size_t
n
)
{
char
*
q
=
dst
;
const
char
*
p
=
src
;
char
ch
;
while
(
n
--)
{
*
q
++
=
ch
=
*
p
++;
if
(!
ch
)
break
;
}
return
dst
;
}