+/* $OpenLDAP$ */
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
LDAPFiltDesc *
-ldap_init_getfilter_buf( char *buf, long buflen )
+ldap_init_getfilter_buf( char *buf, ber_len_t buflen )
{
LDAPFiltDesc *lfdp;
LDAPFiltList *flp, *nextflp;
for ( flp = lfdp->lfd_filtlist; flp != NULL; flp = flp->lfl_next ) {
/* compile tagpat, continue if we fail */
- if (regcomp(&re, tagpat, 0) != 0)
+ if (regcomp(&re, tagpat, REG_EXTENDED|REG_NOSUB) != 0)
continue;
- /* match tagpatern and tag, continue if we fail */
+ /* match tagpattern and tag, continue if we fail */
rc = regexec(&re, flp->lfl_tag, 0, NULL, 0);
regfree(&re);
if (rc != 0)
continue;
/* compile flp->ifl_pattern, continue if we fail */
- if (regcomp(&re, flp->lfl_pattern, 0) != 0)
+ if (regcomp(&re, flp->lfl_pattern, REG_EXTENDED|REG_NOSUB) != 0)
continue;
/* match ifl_pattern and lfd_curval, continue if we fail */
void
ldap_build_filter(
char *filtbuf,
- unsigned long buflen,
+ ber_len_t buflen,
LDAP_CONST char *pattern,
LDAP_CONST char *prefix,
LDAP_CONST char *suffix,
*f++ = *p;
}
- if ( (unsigned long) (f - filtbuf) > buflen ) {
+ if ( (size_t) (f - filtbuf) > buflen ) {
/* sanity check */
--f;
break;
}
}
- if ( suffix != NULL && (
- (unsigned long) ( f - filtbuf ) < buflen ) )
+ if ( suffix != NULL && ( (size_t) (f - filtbuf) < buflen ) )
{
strcpy( f, suffix );
} else {