:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[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 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 }