git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
update for HEAD-2003091401
[reactos.git]
/
lib
/
msvcrt
/
string
/
strdup.c
1
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2
#include <msvcrt/string.h>
3
#include <msvcrt/stdlib.h>
4
5
6
/*
7
* @implemented
8
*/
9
char *_strdup(const char *_s)
10
{
11
char *rv;
12
if (_s == 0)
13
return 0;
14
rv = (char *)malloc(strlen(_s) + 1);
15
if (rv == 0)
16
return 0;
17
strcpy(rv, _s);
18
return rv;
19
}