shithub: scc

ref: 9fbe2c36662bf635d8e4d477ea75470a08a5c11f
dir: /lib/xstrdup.c/

View raw version
#include <string.h>
#include "../inc/cc.h"

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

	return memcpy(p, s, len);
}