aboutsummaryrefslogtreecommitdiffstats
path: root/libical/MacOS/strdup.c
blob: ae60fee3dfb53e944001eb4a4398a3d89687d198 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

#include "strdup.h"
#include <string.h>
#include <stdlib.h>


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

        if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL )
                return( NULL );

        strcpy( p, s );

        return( p );
}