shithub: scc

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