diff options
author | Noriko Hosoi <nhosoi@kiki.usersys.redhat.com> | 2009-06-03 08:48:14 -0700 |
---|---|---|
committer | Noriko Hosoi <nhosoi@kiki.usersys.redhat.com> | 2009-06-03 08:48:14 -0700 |
commit | dacd95700c876d7202193683ed52aec9f3c19f48 (patch) | |
tree | 6c55bdb3eff660f1e78c82f6ca5e7fbce046e1f0 /ldap/servers/slapd/regex.c | |
parent | d7828f54c12f0c50e7165f8d7e849f8ffa3ff167 (diff) | |
download | ds-dacd95700c876d7202193683ed52aec9f3c19f48.tar.gz ds-dacd95700c876d7202193683ed52aec9f3c19f48.tar.xz ds-dacd95700c876d7202193683ed52aec9f3c19f48.zip |
Compiler warnings and paged results on DSE
1) Fixing compiler warnings on regex.c.
2) Adding dse_search_set_release to dse.c to support simple paged results on DSE.
Diffstat (limited to 'ldap/servers/slapd/regex.c')
-rw-r--r-- | ldap/servers/slapd/regex.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ldap/servers/slapd/regex.c b/ldap/servers/slapd/regex.c index 9746aa03..24e7b860 100644 --- a/ldap/servers/slapd/regex.c +++ b/ldap/servers/slapd/regex.c @@ -61,7 +61,7 @@ struct slapi_regex_handle { * \warning The regex handler should be released by slapi_re_free(). */ Slapi_Regex * -slapi_re_comp( char *pat, char **error ) +slapi_re_comp( const char *pat, const char **error ) { Slapi_Regex *re_handle = NULL; pcre *re = NULL; @@ -94,7 +94,7 @@ slapi_re_comp( char *pat, char **error ) * \warning The regex handler should be released by slapi_re_free(). */ int -slapi_re_exec( Slapi_Regex *re_handle, char *subject, time_t time_up ) +slapi_re_exec( Slapi_Regex *re_handle, const char *subject, time_t time_up ) { int rc; time_t curtime = current_time(); @@ -143,16 +143,16 @@ slapi_re_exec( Slapi_Regex *re_handle, char *subject, time_t time_up ) * \warning The regex handler should be released by slapi_re_free(). */ int -slapi_re_subs( Slapi_Regex *re_handle, - char *subject, char *src, char **dst, unsigned long dstlen ) +slapi_re_subs( Slapi_Regex *re_handle, const char *subject, + const char *src, char **dst, unsigned long dstlen ) { int thislen = 0; int len = 0; int pin; int *ovector; char *mydst = *dst; - char *substring_start; - char *p; + const char *substring_start; + const char *p; if (NULL == src || NULL == re_handle || NULL == re_handle->re_ovector) { memset(*dst, '\0', dstlen); @@ -163,7 +163,7 @@ slapi_re_subs( Slapi_Regex *re_handle, ovector = re_handle->re_ovector; - for (p = src; *p != NULL; p++) { + for (p = src; *p != '\0'; p++) { if ('&' == *p) { if (re_handle->re_oveccount <= 1) { memset(*dst, '\0', dstlen); |