shithub: tlsclient

ref: bcebd4f1fe799a915322e06c03f8b47bcd500d2f
dir: /libc/runestrdup.c/

View raw version
#include <u.h>
#include <libc.h>

Rune*
runestrdup(Rune *s)
{
	Rune *ns;

	ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
	if(ns == 0)
		return 0;
	setmalloctag(ns, getcallerpc(&s));
	return runestrcpy(ns, s);
}