Sign in
android
/
platform
/
external
/
syslinux
/
refs/heads/oreo-mr1-release
/
.
/
com32
/
lib
/
strdup.c
blob: 766958b10f405bd505fc686c1cdbf5a0a141b1f9 [
file
] [
log
] [
blame
] [
edit
]
/*
* strdup.c
*/
#include
<string.h>
#include
<stdlib.h>
char
*
strdup
(
const
char
*
s
)
{
int
l
=
strlen
(
s
)
+
1
;
char
*
d
=
malloc
(
l
);
if
(
d
)
memcpy
(
d
,
s
,
l
);
return
d
;
}