shithub: scc

ref: c405c48a66cc5a7eeb192db81d42c08da2b19d73
dir: /lib/xstrdup.c/

View raw version

#include <string.h>
#include <cc.h>

char *
xstrdup(const char *s)
{
	register size_t len = strlen(s) + 1;
	register char *p = xmalloc(len);

	return memcpy(p, s, len);
}