shithub: scc

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