From: Kurt Zeilenga Date: Fri, 20 Aug 1999 19:12:41 +0000 (+0000) Subject: const'ification X-Git-Tag: TWEB_OL_BASE~140 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3f85d6b2ac4365c4225d1294cef10df6fda1c3fd;p=openldap const'ification --- diff --git a/servers/slapd/back-bdb2/attr.c b/servers/slapd/back-bdb2/attr.c index 6728fc868e..f7563b2d48 100644 --- a/servers/slapd/back-bdb2/attr.c +++ b/servers/slapd/back-bdb2/attr.c @@ -86,7 +86,7 @@ bdb2i_attr_masks( void bdb2i_attr_index_config( struct ldbminfo *li, - char *fname, + const char *fname, int lineno, int argc, char **argv, diff --git a/servers/slapd/back-bdb2/cache.c b/servers/slapd/back-bdb2/cache.c index 33b9e15fb7..cd71733bef 100644 --- a/servers/slapd/back-bdb2/cache.c +++ b/servers/slapd/back-bdb2/cache.c @@ -350,14 +350,14 @@ ID bdb2i_cache_find_entry_dn2id( BackendDB *be, struct cache *cache, - char *dn + const char *dn ) { Entry e, *ep; ID id; int count = 0; - e.e_dn = dn; + e.e_dn = (char *) dn; e.e_ndn = ch_strdup( dn ); (void) dn_normalize_case( e.e_ndn ); diff --git a/servers/slapd/back-bdb2/config.c b/servers/slapd/back-bdb2/config.c index e38b8542eb..2f7fcd340c 100644 --- a/servers/slapd/back-bdb2/config.c +++ b/servers/slapd/back-bdb2/config.c @@ -180,7 +180,7 @@ bdb2i_back_db_config_internal( int bdb2_back_db_config( BackendDB *be, - char *fname, + const char *fname, int lineno, int argc, char **argv diff --git a/servers/slapd/back-bdb2/dn2id.c b/servers/slapd/back-bdb2/dn2id.c index 43707b77d9..0d49a099dd 100644 --- a/servers/slapd/back-bdb2/dn2id.c +++ b/servers/slapd/back-bdb2/dn2id.c @@ -14,7 +14,7 @@ int bdb2i_dn2id_add( BackendDB *be, - char *dn, + const char *dn, ID id ) { @@ -91,7 +91,7 @@ bdb2i_dn2id_add( ID bdb2i_dn2id( BackendDB *be, - char *dn + const char *dn ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; @@ -143,7 +143,7 @@ bdb2i_dn2id( ID_BLOCK * bdb2i_dn2idl( BackendDB *be, - char *dn, + const char *dn, int prefix ) { struct dbcache *db; @@ -178,7 +178,7 @@ bdb2i_dn2idl( int bdb2i_dn2id_delete( BackendDB *be, - char *dn + const char *dn ) { struct dbcache *db; @@ -219,7 +219,7 @@ bdb2i_dn2id_delete( Entry * bdb2i_dn2entry_rw( BackendDB *be, - char *dn, + const char *dn, Entry **matched, int rw ) diff --git a/servers/slapd/back-bdb2/external.h b/servers/slapd/back-bdb2/external.h index 58da13d224..f280b28311 100644 --- a/servers/slapd/back-bdb2/external.h +++ b/servers/slapd/back-bdb2/external.h @@ -17,7 +17,7 @@ extern int bdb2_back_db_close LDAP_P(( BackendDB *bd )); extern int bdb2_back_db_destroy LDAP_P(( BackendDB *bd )); extern int bdb2_back_db_config LDAP_P(( BackendDB *bd, - char *fname, int lineno, int argc, char **argv )); + const char *fname, int lineno, int argc, char **argv )); extern int bdb2_back_bind LDAP_P(( BackendDB *bd, Connection *conn, Operation *op, @@ -55,8 +55,8 @@ extern int bdb2_back_abandon LDAP_P(( BackendDB *bd, Connection *conn, Operation *op, int msgid )); extern int bdb2_back_group LDAP_P(( BackendDB *bd, - Entry *target, char* gr_ndn, char* op_ndn, - char* objectclassValue, char* groupattrName)); + Entry *target, const char* gr_ndn, const char* op_ndn, + const char* objectclassValue, const char* groupattrName)); /* hooks for slap tools */ extern int bdb2_tool_entry_open LDAP_P(( BackendDB *be, int mode )); diff --git a/servers/slapd/back-bdb2/group.c b/servers/slapd/back-bdb2/group.c index 6e393757e3..94967d756f 100644 --- a/servers/slapd/back-bdb2/group.c +++ b/servers/slapd/back-bdb2/group.c @@ -20,10 +20,10 @@ static int bdb2i_back_group_internal( BackendDB *be, Entry *target, - char *gr_ndn, - char *op_ndn, - char *objectclassValue, - char *groupattrName + const char *gr_ndn, + const char *op_ndn, + const char *objectclassValue, + const char *groupattrName ) { struct ldbminfo *li = (struct ldbminfo *) be->be_private; @@ -98,7 +98,7 @@ bdb2i_back_group_internal( goto return_results; } - bv.bv_val = objectclassValue; + bv.bv_val = (char *) objectclassValue; bv.bv_len = strlen( bv.bv_val ); if (value_find(attr->a_vals, &bv, attr->a_syntax, 1) != 0) { @@ -120,7 +120,7 @@ bdb2i_back_group_internal( objectclassValue, groupattrName, 0 ); - bv.bv_val = op_ndn; + bv.bv_val = (char *) op_ndn; bv.bv_len = strlen( op_ndn ); if (value_find( attr->a_vals, &bv, attr->a_syntax, 1) != 0 ) { @@ -150,10 +150,10 @@ int bdb2_back_group( BackendDB *be, Entry *target, - char *gr_ndn, - char *op_ndn, - char *objectclassValue, - char *groupattrName + const char *gr_ndn, + const char *op_ndn, + const char *objectclassValue, + const char *groupattrName ) { DB_LOCK lock; diff --git a/servers/slapd/back-bdb2/proto-back-bdb2.h b/servers/slapd/back-bdb2/proto-back-bdb2.h index 7f1042202d..d2c18a6454 100644 --- a/servers/slapd/back-bdb2/proto-back-bdb2.h +++ b/servers/slapd/back-bdb2/proto-back-bdb2.h @@ -37,7 +37,8 @@ Entry * bdb2i_deref_r LDAP_P(( void bdb2i_attr_masks LDAP_P(( struct ldbminfo *li, char *type, int *indexmask, int *syntaxmask )); -void bdb2i_attr_index_config LDAP_P(( struct ldbminfo *li, char *fname, +void bdb2i_attr_index_config LDAP_P(( struct ldbminfo *li, + const char *fname, int lineno, int argc, char **argv, int init )); /* @@ -52,7 +53,7 @@ void bdb2i_cache_return_entry_rw LDAP_P(( struct cache *cache, Entry *e, #define bdb2i_cache_return_entry_w(c, e) bdb2i_cache_return_entry_rw((c), (e), 1) ID bdb2i_cache_find_entry_dn2id LDAP_P(( BackendDB *be, struct cache *cache, - char *dn )); + const char *dn )); Entry * bdb2i_cache_find_entry_id LDAP_P(( struct cache *cache, ID id, int rw )); int bdb2i_cache_delete_entry LDAP_P(( struct cache *cache, Entry *e )); @@ -73,19 +74,19 @@ int bdb2i_cache_delete LDAP_P(( struct dbcache *db, Datum key )); * dn2id.c */ -int bdb2i_dn2id_add LDAP_P(( BackendDB *be, char *dn, ID id )); -ID bdb2i_dn2id LDAP_P(( BackendDB *be, char *dn )); -int bdb2i_dn2id_delete LDAP_P(( BackendDB *be, char *dn )); +int bdb2i_dn2id_add LDAP_P(( BackendDB *be, const char *dn, ID id )); +ID bdb2i_dn2id LDAP_P(( BackendDB *be, const char *dn )); +int bdb2i_dn2id_delete LDAP_P(( BackendDB *be, const char *dn )); ID_BLOCK * bdb2i_dn2idl LDAP_P(( BackendDB *be, - char *dn, + const char *dn, int prefix )); Entry * bdb2i_dn2entry_rw LDAP_P(( BackendDB *be, - char *dn, + const char *dn, Entry **matched, int rw ));