shithub: scc

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