ReactOS  0.4.13-dev-39-g8b6696f
strdup.c File Reference
#include <precomp.h>
Include dependency graph for strdup.c:

Go to the source code of this file.

Functions

char_strdup (const char *_s)
 

Function Documentation

◆ _strdup()

char* _strdup ( const char _s)

Definition at line 7 of file strdup.c.

8 {
9  char *rv;
10  if (_s == 0)
11  return 0;
12  rv = (char *)malloc(strlen(_s) + 1);
13  if (rv == 0)
14  return 0;
15  strcpy(rv, _s);
16  return rv;
17 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define malloc
Definition: debug_ros.c:4