shithub: scc

ref: adad9f272e4784ea0bf10da9b291d60ee7e25e45
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);
}