shithub: scc

ref: 27e63021261aee56e2195e328c9e4ab61bce8870
dir: /src/libscc/xstrdup.c/

View raw version
static char sccsid[] = "@(#) ./lib/scc/xstrdup.c";
#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);
}