mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
20 lines
321 B
C
20 lines
321 B
C
|
|
#include "portable.h"
|
||
|
|
|
||
|
|
#include <stdlib.h>
|
||
|
|
#include <ac/string.h>
|
||
|
|
#include <ac/time.h>
|
||
|
|
|
||
|
|
#include "ldap-int.h"
|
||
|
|
|
||
|
|
char *(ldap_strdup)( const char *s )
|
||
|
|
{
|
||
|
|
char *p;
|
||
|
|
|
||
|
|
if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL )
|
||
|
|
return( (char *)0 );
|
||
|
|
|
||
|
|
strcpy( p, s );
|
||
|
|
|
||
|
|
return( p );
|
||
|
|
}
|