]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/url.c
Add strdup.c from -llutil, renamed to ldap_strdup() and always used.
[openldap] / libraries / libldap / url.c
index b97139a12d6d399ac8c450dd0281e88795250463..bc6726164fe63cd7abd28f52b2aecff7ad1c9a18 100644 (file)
@@ -34,9 +34,10 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of
 #include "ldap-int.h"
 
 
+/* local functions */
 static int skip_url_prefix LDAP_P(( char **urlp, int *enclosedp ));
 static void hex_unescape LDAP_P(( char *s ));
-static int unhex LDAP_P(( char c ));
+static int unhex( char c );
 
 
 int
@@ -112,7 +113,7 @@ ldap_url_parse( char *url, LDAPURLDesc **ludpp )
        }
 
        /* make working copy of the remainder of the URL */
-       if (( url = strdup( url )) == NULL ) {
+       if (( url = ldap_strdup( url )) == NULL ) {
                ldap_free_urldesc( ludp );
                return( LDAP_URL_ERR_MEM );
        }
@@ -262,7 +263,7 @@ ldap_url_search( LDAP *ld, char *url, int attrsonly )
        if ( ludp->lud_host != NULL || ludp->lud_port != 0 ) {
 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
                if (( srv = (LDAPServer *)calloc( 1, sizeof( LDAPServer )))
-                   == NULL || ( srv->lsrv_host = strdup( ludp->lud_host ==
+                   == NULL || ( srv->lsrv_host = ldap_strdup( ludp->lud_host ==
                    NULL ? ld->ld_defhost : ludp->lud_host )) == NULL ) {
                        if ( srv != NULL ) {
                                free( srv );