mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-05 14:29:28 +00:00
52cb49752a
this is heavily stripped down.
11 lines
172 B
C
11 lines
172 B
C
char *
|
|
strdup(s)
|
|
char *s;
|
|
{
|
|
char *result = (char*)malloc(strlen(s) + 1);
|
|
if (result == (char*)0)
|
|
return (char*)0;
|
|
strcpy(result, s);
|
|
return result;
|
|
}
|