plan9front/sys/src/libc/port/runestrdup.c

15 lines
212 B
C
Raw Normal View History

#include <u.h>
#include <libc.h>
Rune*
2016-03-19 14:35:36 -07:00
runestrdup(Rune *s)
{
Rune *ns;
ns = malloc(sizeof(Rune)*(runestrlen(s) + 1));
if(ns == 0)
return 0;
2013-01-25 05:15:48 -08:00
setmalloctag(ns, getcallerpc(&s));
return runestrcpy(ns, s);
}