Sign in
android
/
device
/
linaro
/
hikey
/
0e33772df9ca72fb5f6e3d9a9b9ee547997b1b66
/
.
/
uefi
/
linaro-edk2
/
AppPkg
/
Applications
/
Python
/
Python-2.7.2
/
Python
/
strdup.c
blob: deef5342da476a28d986ebf5848f21bd325e3733 [
file
] [
log
] [
blame
]
/* strdup() replacement (from stdwin, if you must know) */
#include
"pgenheaders.h"
char
*
strdup
(
const
char
*
str
)
{
if
(
str
!=
NULL
)
{
register
char
*
copy
=
malloc
(
strlen
(
str
)
+
1
);
if
(
copy
!=
NULL
)
return
strcpy
(
copy
,
str
);
}
return
NULL
;
}