]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/getfilter.c
Add strdup.c from -llutil, renamed to ldap_strdup() and always used.
[openldap] / libraries / libldap / getfilter.c
index 3e5ea7b51119c4f2d81d1f8459a254cae639971b..e466adc243cd70df73960a0ae09591ace8992777 100644 (file)
@@ -25,12 +25,9 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of
 #include <sys/file.h>
 #endif
 
-#include "lber.h"
-#include "ldap.h"
+#include "ldap-int.h"
 
 static int break_into_words LDAP_P(( char *str, char *delims, char ***wordsp ));
-int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp ));
-void free_strarray LDAP_P(( char **sap ));
 
 #define FILT_MAX_LINE_LEN      1024
 
@@ -118,7 +115,7 @@ ldap_init_getfilter_buf( char *buf, long buflen )
                ldap_getfilter_free( lfdp );
                return( NULL );
            }
-           nextflp->lfl_tag = strdup( tag );
+           nextflp->lfl_tag = ldap_strdup( tag );
            nextflp->lfl_pattern = tok[ 0 ];
            if ( (rc = regcomp( &re, nextflp->lfl_pattern, 0 )) != 0 ) {
 #ifdef LDAP_LIBUI
@@ -213,12 +210,12 @@ ldap_setfilteraffixes( LDAPFiltDesc *lfdp, char *prefix, char *suffix )
     if ( lfdp->lfd_filtprefix != NULL ) {
        free( lfdp->lfd_filtprefix );
     }
-    lfdp->lfd_filtprefix = ( prefix == NULL ) ? NULL : strdup( prefix );
+    lfdp->lfd_filtprefix = ( prefix == NULL ) ? NULL : ldap_strdup( prefix );
 
     if ( lfdp->lfd_filtsuffix != NULL ) {
        free( lfdp->lfd_filtsuffix );
     }
-    lfdp->lfd_filtsuffix = ( suffix == NULL ) ? NULL : strdup( suffix );
+    lfdp->lfd_filtsuffix = ( suffix == NULL ) ? NULL : ldap_strdup( suffix );
 }
 
 
@@ -267,7 +264,7 @@ ldap_getfirstfilter( LDAPFiltDesc *lfdp, char *tagpat, char *value )
        return( NULL );
     }
 
-    if (( lfdp->lfd_curvalcopy = strdup( value )) == NULL ) {
+    if (( lfdp->lfd_curvalcopy = ldap_strdup( value )) == NULL ) {
        return( NULL );
     }