Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
 
4
char*
5
strdup(char *s) 
6
{  
7
	char *ns;
8
 
9
	ns = malloc(strlen(s) + 1);
10
	if(ns == 0)
11
		return 0;
12
	setmalloctag(ns, getcallerpc(&s));
13
 
14
	return strcpy(ns, s);
15
}