Commit 546262ac authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

complete this round of constification

parent 8ac21b67
......@@ -321,7 +321,7 @@ attr_syntax_config(
save = argv[lasti];
argv[lasti] = NULL;
at->at_names = charray_dup( (const char **) argv );
at->at_names = charray_dup( argv );
argv[lasti] = save;
code = at_add( at, &err );
......
......@@ -35,7 +35,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_bind = charray_dup( (const char**) &argv[1] );
si->si_bind = charray_dup( &argv[1] );
/* command + args to exec for unbinds */
} else if ( strcasecmp( argv[0], "unbind" ) == 0 ) {
......@@ -45,7 +45,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_unbind = charray_dup( (const char**) &argv[1] );
si->si_unbind = charray_dup( &argv[1] );
/* command + args to exec for searches */
} else if ( strcasecmp( argv[0], "search" ) == 0 ) {
......@@ -55,7 +55,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_search = charray_dup( (const char**) &argv[1] );
si->si_search = charray_dup( &argv[1] );
/* command + args to exec for compares */
} else if ( strcasecmp( argv[0], "compare" ) == 0 ) {
......@@ -65,7 +65,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_compare = charray_dup( (const char**) &argv[1] );
si->si_compare = charray_dup( &argv[1] );
/* command + args to exec for modifies */
} else if ( strcasecmp( argv[0], "modify" ) == 0 ) {
......@@ -75,7 +75,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_modify = charray_dup( (const char**) &argv[1] );
si->si_modify = charray_dup( &argv[1] );
/* command + args to exec for modrdn */
} else if ( strcasecmp( argv[0], "modrdn" ) == 0 ) {
......@@ -85,7 +85,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_modrdn = charray_dup( (const char**) &argv[1] );
si->si_modrdn = charray_dup( &argv[1] );
/* command + args to exec for add */
} else if ( strcasecmp( argv[0], "add" ) == 0 ) {
......@@ -95,7 +95,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_add = charray_dup( (const char**) &argv[1] );
si->si_add = charray_dup( &argv[1] );
/* command + args to exec for delete */
} else if ( strcasecmp( argv[0], "delete" ) == 0 ) {
......@@ -105,7 +105,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_delete = charray_dup( (const char**) &argv[1] );
si->si_delete = charray_dup( &argv[1] );
/* command + args to exec for abandon */
} else if ( strcasecmp( argv[0], "abandon" ) == 0 ) {
......@@ -115,7 +115,7 @@ shell_back_db_config(
fname, lineno );
return( 1 );
}
si->si_abandon = charray_dup( (const char**) &argv[1] );
si->si_abandon = charray_dup( &argv[1] );
/* anything else */
} else {
......
......@@ -40,7 +40,7 @@ charray_add(
void
charray_merge(
char ***a,
const char **s
char **s
)
{
int i, n, nn;
......@@ -79,7 +79,7 @@ charray_free( char **array )
int
charray_inlist(
const char **a,
char **a,
const char *s
)
{
......@@ -95,7 +95,7 @@ charray_inlist(
}
char **
charray_dup( const char **a )
charray_dup( char **a )
{
int i;
char **new;
......@@ -115,7 +115,7 @@ charray_dup( const char **a )
char *
charray2str( const char **a )
charray2str( char **a )
{
char *s;
int i;
......
......@@ -148,12 +148,12 @@ void ch_free LDAP_P(( void * ));
*/
void charray_add LDAP_P(( char ***a, const char *s ));
void charray_merge LDAP_P(( char ***a, const char **s ));
void charray_merge LDAP_P(( char ***a, char **s ));
void charray_free LDAP_P(( char **array ));
int charray_inlist LDAP_P(( const char **a, const char *s ));
char ** charray_dup LDAP_P(( const char **a ));
int charray_inlist LDAP_P(( char **a, const char *s ));
char ** charray_dup LDAP_P(( char **a ));
char ** str2charray LDAP_P(( const char *str, const char *brkstr ));
char * charray2str LDAP_P(( const char **a ));
char * charray2str LDAP_P(( char **a ));
/*
* controls.c
......
......@@ -217,10 +217,10 @@ send_ldap_response(
ber_tag_t tag,
ber_int_t msgid,
ber_int_t err,
char *matched,
char *text,
const char *matched,
const char *text,
struct berval **ref,
char *resoid,
const char *resoid,
struct berval *resdata,
LDAPControl **ctrls
)
......@@ -381,7 +381,8 @@ send_ldap_result(
err = LDAP_NO_SUCH_OBJECT;
} else if ( op->o_protocol < LDAP_VERSION3 ) {
err = LDAP_PARTIAL_RESULTS;
tmp = text = v2ref( ref );
tmp = v2ref( ref );
text = tmp;
ref = NULL;
}
}
......@@ -445,7 +446,8 @@ send_search_result(
err = LDAP_PARTIAL_RESULTS;
}
tmp = text = v2ref( refs );
tmp = v2ref( refs );
text = tmp;
refs = NULL;
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment