Revision c3ffbbdf3d5645ee07c22649f2028f9dffc762ba authored by Łukasz Langa on 28 June 2021, 10:08:34 UTC, committed by Łukasz Langa on 28 June 2021, 10:08:34 UTC
1 parent 634da2d
strdup.c
/* strdup() replacement (from stdwin, if you must know) */
char *
strdup(const char *str)
{
if (str != NULL) {
char *copy = malloc(strlen(str) + 1);
if (copy != NULL)
return strcpy(copy, str);
}
return NULL;
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...