From 2cc187ffbfa145469ad17ab6dcbd283f6a931fc0 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Tue, 13 Jul 1999 05:13:33 +0000 Subject: [PATCH] constify ldap_int_put_controls, ldap_control_dup, ldap_controls_dup --- libraries/libldap/controls.c | 13 ++++++++----- libraries/libldap/ldap-int.h | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libraries/libldap/controls.c b/libraries/libldap/controls.c index a5efc952dc..c84ac88478 100644 --- a/libraries/libldap/controls.c +++ b/libraries/libldap/controls.c @@ -28,12 +28,13 @@ * ldap_int_put_controls */ -int ldap_int_put_controls( +int +ldap_int_put_controls( LDAP *ld, - LDAPControl **ctrls, + LDAPControl *const *ctrls, BerElement *ber ) { - LDAPControl **c; + LDAPControl *const *c; assert( ld != NULL ); assert( ber != NULL ); @@ -261,7 +262,8 @@ ldap_controls_free( LDAPControl **controls ) /* * Duplicate an array of LDAPControl */ -LDAPControl **ldap_controls_dup( LDAPControl **controls ) +LDAPControl ** +ldap_controls_dup( LDAPControl *const *controls ) { LDAPControl **new; int i; @@ -303,7 +305,8 @@ LDAPControl **ldap_controls_dup( LDAPControl **controls ) /* * Duplicate a LDAPControl */ -LDAPControl *ldap_control_dup( LDAPControl *c ) +LDAPControl * +ldap_control_dup( const LDAPControl *c ) { LDAPControl *new; diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index 3a26f42cab..d0ee82bfa8 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -303,10 +303,10 @@ int ldap_check_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype, BerElement *request ) * in controls.c */ LDAPControl *ldap_control_dup LDAP_P(( - LDAPControl *ctrl )); + const LDAPControl *ctrl )); LDAPControl **ldap_controls_dup LDAP_P(( - LDAPControl **ctrls )); + LDAPControl *const *ctrls )); int ldap_int_get_controls LDAP_P(( BerElement *be, @@ -314,7 +314,7 @@ int ldap_int_get_controls LDAP_P(( int ldap_int_put_controls LDAP_P(( LDAP *ld, - LDAPControl **ctrls, + LDAPControl *const *ctrls, BerElement *ber )); /* -- 2.39.5