summaryrefslogtreecommitdiff
path: root/lib9/strdup.c
blob: 2473f8f5cb36abc45a0444063a6a63593375b37f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "lib9.h"

char*
strdup(const char *s) 
{  
	char *os;

	os = malloc(strlen(s) + 1);
	if(os == 0)
		return 0;
	return strcpy(os, s);
}