]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/gdb/libiberty/strdup.c
System Perl is now 5.00503! There is support for threads, but this is
[FreeBSD/FreeBSD.git] / contrib / gdb / libiberty / strdup.c
1 char *
2 strdup(s)
3      char *s;
4 {
5     char *result = (char*)malloc(strlen(s) + 1);
6     if (result == (char*)0)
7         return (char*)0;
8     strcpy(result, s);
9     return result;
10 }