shithub: scc

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