:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / lib / crtdll / string / strdup.c
1
2 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
3 #include <crtdll/string.h>
4 #include <crtdll/stdlib.h>
5
6 char *_strdup(const char *_s)
7 {
8   char *rv;
9   if (_s == 0)
10     return 0;
11   rv = (char *)malloc(strlen(_s) + 1);
12   if (rv == 0)
13     return 0;
14   strcpy(rv, _s);
15   return rv;
16 }