4.4BSD/usr/src/contrib/gdb-4.7.lbl/libiberty/strdup.c

Compare this file to the similar file:
Show the results in this format:

char *
strdup(s)
     char *s;
{
    char *result = (char*)malloc(strlen(s) + 1);
    if (result == (char*)0)
	return (char*)0;
    strcpy(result, s);
    return result;
}