From 97a66488324aea1cc8ebcbaea3b022f800085866 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 24 Jan 1999 01:07:52 +0000 Subject: [PATCH] Forgot to add new string.c. --- libraries/libldap/string.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libraries/libldap/string.c diff --git a/libraries/libldap/string.c b/libraries/libldap/string.c new file mode 100644 index 0000000000..a251a660cc --- /dev/null +++ b/libraries/libldap/string.c @@ -0,0 +1,26 @@ +/* + * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#include "portable.h" + +#include +#include +#include + +#include "ldap-int.h" + +char * +(ldap_pvt_strdup)( const char *s ) +{ + char *p; + int len; + len = strlen( s ) + 1; + if ( (p = (char *) malloc( len )) == NULL ) + return( (char *)0 ); + + memcpy( p, s, len ); + + return( p ); +} -- 2.39.5