]> git.sur5r.net Git - openldap/blob - libraries/libldap/strdup.c
Add reference to ldap.conf(5).
[openldap] / libraries / libldap / strdup.c
1 /*
2  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5
6 #include "portable.h"
7
8 #include <stdlib.h>
9 #include <ac/string.h>
10 #include <ac/time.h>
11
12 #include "ldap-int.h"
13
14 char *
15 (ldap_pvt_strdup)( const char *s )
16 {
17         char    *p;
18         int     len;
19         len = strlen( s ) + 1;
20         if ( (p = (char *) malloc( len )) == NULL )
21                 return( (char *)0 );
22
23         memcpy( p, s, len );
24
25         return( p );
26 }