shithub: scc

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