]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/valsort.c
trim listed modules
[openldap] / servers / slapd / overlays / valsort.c
index 2ea7c44c496c50ba5b03ea1b254731fcdae8f2ee..b089a7189974e2cfd50423de36ea7c217811a488 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2005 The OpenLDAP Foundation.
+ * Copyright 2005-2007 The OpenLDAP Foundation.
  * Portions copyright 2005 Symas Corporation.
  * All rights reserved.
  *
@@ -339,8 +339,9 @@ valsort_response( Operation *op, SlapReply *rs )
 
                                if ( a->a_vals != a->a_nvals ) {
                                        ptr = a->a_vals[i].bv_val;
-                                       end = (char *) ber_bvchr( &a->a_vals[i], '}' ) + 1;
+                                       end = ber_bvchr( &a->a_vals[i], '}' );
                                        assert( end != NULL );
+                                       end++;
                                        for (;*end;)
                                                *ptr++ = *end++;
                                        *ptr = '\0';
@@ -530,7 +531,7 @@ valsort_parseCtrl(
 
 static slap_overinst valsort;
 
-int valsort_init()
+int valsort_initialize( void )
 {
        int rc;
 
@@ -563,7 +564,7 @@ int valsort_init()
 
 #if SLAPD_OVER_VALSORT == SLAPD_MOD_DYNAMIC
 int init_module( int argc, char *argv[]) {
-       return valsort_init();
+       return valsort_initialize();
 }
 #endif