shithub: scc

ref: e4a5cc43d1af9cdda835f29140376d7c3a35fe32
dir: /src/libscc/xstrdup.c/

View raw version
#include <string.h>
#include <scc/scc.h>

char *
xstrdup(const char *s)
{
	size_t len = strlen(s) + 1;
	char *p = xmalloc(len);

	return memcpy(p, s, len);
}