]> git.sur5r.net Git - openldap/blob - libraries/libldap/strdup.c
Add strdup.c from -llutil, renamed to ldap_strdup() and always used.
[openldap] / libraries / libldap / strdup.c
1 #include "portable.h"
2
3 #include <stdlib.h>
4 #include <ac/string.h>
5 #include <ac/time.h>
6
7 #include "ldap-int.h"
8
9 char *(ldap_strdup)( const char *s )
10 {
11         char    *p;
12
13         if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL )
14                 return( (char *)0 );
15
16         strcpy( p, s );
17
18         return( p );
19 }