From: Kurt Zeilenga Date: Wed, 9 Jan 2002 18:18:36 +0000 (+0000) Subject: Fix problems caused by lint removal X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~225 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39c02506de996c9aff2e275793a9014032fbdbe0;p=openldap Fix problems caused by lint removal --- diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index 252355faaf..79e2e037b3 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -418,7 +418,7 @@ retry: /* transaction retry */ /* Get attribute type and attribute value of our new rdn, we will * need to add that to our new entry */ - if ( ldap_str2rdn( newrdn->bv_val, &new_rdn, &(char *)text, + if ( ldap_str2rdn( newrdn->bv_val, &new_rdn, (char **)&text, LDAP_DN_FORMAT_LDAP ) ) { Debug( LDAP_DEBUG_TRACE, @@ -433,7 +433,7 @@ retry: /* transaction retry */ "bdb_modrdn: new_rdn_type=\"%s\", new_rdn_val=\"%s\"\n", new_rdn[0][0]->la_attr.bv_val, new_rdn[0][0]->la_value.bv_val, 0 ); - if ( ldap_str2rdn( dn->bv_val, &old_rdn, &(char *)text, + if ( ldap_str2rdn( dn->bv_val, &old_rdn, (char **)&text, LDAP_DN_FORMAT_LDAP ) ) { Debug( LDAP_DEBUG_TRACE, diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 25aa8104a6..b752cd0107 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -496,7 +496,7 @@ ldbm_back_modrdn( /* Get attribute types and values of our new rdn, we will * need to add that to our new entry */ - if ( ldap_str2rdn( newrdn->bv_val, &new_rdn, &(char *)text, + if ( ldap_str2rdn( newrdn->bv_val, &new_rdn, (char **)&text, LDAP_DN_FORMAT_LDAP ) ) { #ifdef NEW_LOGGING @@ -524,7 +524,7 @@ ldbm_back_modrdn( #endif /* Retrieve the old rdn from the entry's dn */ - if ( ldap_str2rdn( dn->bv_val, &old_rdn, &(char *)text, + if ( ldap_str2rdn( dn->bv_val, &old_rdn, (char **)&text, LDAP_DN_FORMAT_LDAP ) ) { #ifdef NEW_LOGGING diff --git a/servers/slapd/back-monitor/conn.c b/servers/slapd/back-monitor/conn.c index 0d32d0ca2a..a810637f4e 100644 --- a/servers/slapd/back-monitor/conn.c +++ b/servers/slapd/back-monitor/conn.c @@ -404,7 +404,7 @@ monitor_subsys_conn_create( /* create exactly the required entry */ - if ( ldap_str2rdn( ndn->bv_val, &values, &(char *)text, + if ( ldap_str2rdn( ndn->bv_val, &values, (char **)&text, LDAP_DN_FORMAT_LDAP ) ) { return( -1 ); diff --git a/servers/slapd/back-passwd/search.c b/servers/slapd/back-passwd/search.c index 8e985cf0f1..4366f32aa8 100644 --- a/servers/slapd/back-passwd/search.c +++ b/servers/slapd/back-passwd/search.c @@ -90,8 +90,9 @@ passwd_back_search( /* Use the first attribute of the DN * as an attribute within the entry itself. */ - if( ldap_str2rdn( base->bv_val, &rdn, &text, - LDAP_DN_FORMAT_LDAP ) ) { + if( ldap_str2rdn( base->bv_val, &rdn, (char **)&text, + LDAP_DN_FORMAT_LDAP ) ) + { err = LDAP_INVALID_DN_SYNTAX; goto done; } @@ -194,7 +195,9 @@ passwd_back_search( goto done; } - if ( ldap_str2rdn( base->bv_val, &rdn, &text, LDAP_DN_FORMAT_LDAP )) { + if ( ldap_str2rdn( base->bv_val, &rdn, (char **)&text, + LDAP_DN_FORMAT_LDAP )) + { err = LDAP_OPERATIONS_ERROR; goto done; } diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index 3683e23bb5..0ac52e7884 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -90,7 +90,7 @@ int get_ctrls( LDAPControl ***ctrls = &op->o_ctrls; struct slap_control *c; int rc = LDAP_SUCCESS; - char *errmsg = NULL; + const char *errmsg = NULL; len = ber_pvt_ber_remaining(ber); @@ -386,4 +386,4 @@ static int parseSubentries ( op->o_subentries_visibility = (ctrl->ldctl_value.bv_val[2] != 0x00); return LDAP_SUCCESS; -} \ No newline at end of file +} diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 52cbb6e8be..de3ae7dbac 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -646,7 +646,8 @@ dnParent( const char *p; int rc; - rc = ldap_str2rdn( dn, NULL, & (char *) p, LDAP_DN_FORMAT_LDAP | LDAP_DN_SKIP ); + rc = ldap_str2rdn( dn, NULL, (char **)&p, + LDAP_DN_FORMAT_LDAP | LDAP_DN_SKIP ); if ( rc != LDAP_SUCCESS ) { return rc; } @@ -719,7 +720,7 @@ dnExtractRdn( return LDAP_OTHER; } - rc = ldap_str2rdn( dn->bv_val, &tmpRDN, &(char *)p, LDAP_DN_FORMAT_LDAP ); + rc = ldap_str2rdn( dn->bv_val, &tmpRDN, (char **)&p, LDAP_DN_FORMAT_LDAP ); if ( rc != LDAP_SUCCESS ) { return rc; } @@ -758,7 +759,7 @@ dn_rdnlen( return 0; } - rc = ldap_str2rdn( dn_in->bv_val, NULL, &(char *)p, + rc = ldap_str2rdn( dn_in->bv_val, NULL, (char **)&p, LDAP_DN_FORMAT_LDAP | LDAP_DN_SKIP ); if ( rc != LDAP_SUCCESS ) { return 0; @@ -904,7 +905,7 @@ rdn_attrs( const char * rdn, char ***types, char ***values) assert( *values == NULL ); assert( types == NULL || *types == NULL ); - rc = ldap_str2rdn( rdn, &tmpRDN, &(char *)p, LDAP_DN_FORMAT_LDAP ); + rc = ldap_str2rdn( rdn, &tmpRDN, (char **)&p, LDAP_DN_FORMAT_LDAP ); if ( rc != LDAP_SUCCESS ) { return rc; } @@ -975,7 +976,7 @@ rdnValidate( struct berval *rdn ) /* * must be parsable */ - rc = ldap_str2rdn( rdn, &RDN, &p, LDAP_DN_FORMAT_LDAP ); + rc = ldap_str2rdn( rdn, &RDN, (char **)&p, LDAP_DN_FORMAT_LDAP ); if ( rc != LDAP_SUCCESS ) { return 0; }