From a3f63029f4c645dace63dc1b5f6decd89e3c99d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julio=20S=C3=A1nchez=20Fern=C3=A1ndez?= Date: Mon, 14 Jun 1999 14:34:07 +0000 Subject: [PATCH] Some changes to be more inline with the constification done on the library. --- servers/slapd/attr.c | 8 ++++---- servers/slapd/proto-slap.h | 10 +++++----- servers/slapd/schema.c | 12 ++++++------ servers/slapd/schemaparse.c | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c index 98436b0a1f..fd6707063d 100644 --- a/servers/slapd/attr.c +++ b/servers/slapd/attr.c @@ -210,7 +210,7 @@ attr_syntax_config( LDAP_ATTRIBUTE_TYPE *at; int lasti; int code; - char *err; + const char *err; if ( argc < 2 ) { Debug( LDAP_DEBUG_ANY, @@ -314,7 +314,7 @@ attr_index_name_cmp( AttributeType * at_find( - char *name + const char *name ) { struct aindexrec *air = NULL; @@ -418,7 +418,7 @@ at_find_in_list( static int at_insert( AttributeType *sat, - char **err + const char **err ) { AttributeType **atp; @@ -471,7 +471,7 @@ at_insert( int at_add( LDAP_ATTRIBUTE_TYPE *at, - char **err + const char **err ) { AttributeType *sat; diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index cbb2a4b8a7..ccdcc921b8 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -46,13 +46,13 @@ Attribute * attr_find LDAP_P(( Attribute *a, char *type )); int attr_delete LDAP_P(( Attribute **attrs, char *type )); int attr_syntax LDAP_P(( char *type )); void attr_syntax_config LDAP_P(( char *fname, int lineno, int argc, char **argv )); -AttributeType * at_find LDAP_P(( char *name )); +AttributeType * at_find LDAP_P(( const char *name )); int at_find_in_list LDAP_P(( AttributeType *sat, AttributeType **list )); int at_append_to_list LDAP_P(( AttributeType *sat, AttributeType ***listp )); int at_delete_from_list LDAP_P(( int pos, AttributeType ***listp )); int at_fake_if_needed LDAP_P(( char *name )); int at_schema_info LDAP_P(( Entry *e )); -int at_add LDAP_P(( LDAP_ATTRIBUTE_TYPE *at, char **err )); +int at_add LDAP_P(( LDAP_ATTRIBUTE_TYPE *at, const char **err )); char * at_official_name LDAP_P(( char * a_type )); /* @@ -238,8 +238,8 @@ void send_ldap_search_result LDAP_P(( Connection *conn, Operation *op, int err, */ int oc_schema_check LDAP_P(( Entry *e )); -ObjectClass *oc_find LDAP_P((char *ocname)); -int oc_add LDAP_P((LDAP_OBJECT_CLASS *oc, char **err)); +ObjectClass *oc_find LDAP_P((const char *ocname)); +int oc_add LDAP_P((LDAP_OBJECT_CLASS *oc, const char **err)); void schema_info LDAP_P((Connection *conn, Operation *op, char **attrs, int attrsonly)); @@ -248,7 +248,7 @@ void schema_info LDAP_P((Connection *conn, Operation *op, char **attrs, int attr */ void parse_oc_old LDAP_P(( Backend *be, char *fname, int lineno, int argc, char **argv )); -void parse_oc LDAP_P(( char *fname, int lineno, char * line )); +void parse_oc LDAP_P(( char *fname, int lineno, char *line )); void parse_at LDAP_P(( char *fname, int lineno, char *line )); char *scherr2str LDAP_P((int code)); /* diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index 9ca2ef81d3..9ca5fdb715 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -236,7 +236,7 @@ oc_index_name_cmp( } ObjectClass * -oc_find( char *ocname ) +oc_find( const char *ocname ) { struct oindexrec *oir = NULL; @@ -251,7 +251,7 @@ static int oc_create_required( ObjectClass *soc, char **attrs, - char **err + const char **err ) { char **attrs1; @@ -290,7 +290,7 @@ static int oc_create_allowed( ObjectClass *soc, char **attrs, - char **err + const char **err ) { char **attrs1; @@ -321,7 +321,7 @@ static int oc_add_sups( ObjectClass *soc, char **sups, - char **err + const char **err ) { int code; @@ -376,7 +376,7 @@ oc_add_sups( static int oc_insert( ObjectClass *soc, - char **err + const char **err ) { ObjectClass **ocp; @@ -428,7 +428,7 @@ oc_insert( int oc_add( LDAP_OBJECT_CLASS *oc, - char **err + const char **err ) { ObjectClass *soc; diff --git a/servers/slapd/schemaparse.c b/servers/slapd/schemaparse.c index 385f8f6ab1..07de1d2997 100644 --- a/servers/slapd/schemaparse.c +++ b/servers/slapd/schemaparse.c @@ -49,7 +49,7 @@ parse_oc_old( char last; LDAP_OBJECT_CLASS *oc; int code; - char *err; + const char *err; char **namep; oc = (LDAP_OBJECT_CLASS *) ch_calloc( 1, sizeof(LDAP_OBJECT_CLASS) ); @@ -142,7 +142,7 @@ parse_oc( { LDAP_OBJECT_CLASS *oc; int code; - char *err; + const char *err; oc = ldap_str2objectclass(line,&code,&err); if ( !oc ) { @@ -220,7 +220,7 @@ parse_at( { LDAP_ATTRIBUTE_TYPE *at; int code; - char *err; + const char *err; at = ldap_str2attributetype(line,&code,&err); if ( !at ) { -- 2.39.5