reactos/lib/sdk/crt/string/strdup.c
Hermès Bélusca-Maïto b819608ed8 Create a branch for console restructuration work.
svn path=/branches/condrv_restructure/; revision=63104
2014-05-02 14:13:40 +00:00

18 lines
283 B
C

/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <precomp.h>
/*
* @implemented
*/
char *_strdup(const char *_s)
{
char *rv;
if (_s == 0)
return 0;
rv = (char *)malloc(strlen(_s) + 1);
if (rv == 0)
return 0;
strcpy(rv, _s);
return rv;
}