From: Kurt Zeilenga Date: Mon, 9 Jan 2006 05:22:46 +0000 (+0000) Subject: cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~392 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d8eace75a7472731d78f61df01e648e8af8deee5;p=openldap cleanup --- diff --git a/clients/tools/common.c b/clients/tools/common.c index 317340229d..ba5b546b71 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -1406,13 +1406,15 @@ print_postread( LDAP *ld, LDAPControl *ctrl ) static int print_paged_results( LDAP *ld, LDAPControl *ctrl ) { - unsigned long estimate; + ber_int_t estimate; /* note: pr_cookie is being malloced; it's freed * the next time the control is sent, but the last * time it's not; we don't care too much, because * the last time an empty value is returned... */ - if ( ldap_parse_pageresponse_control( ld, ctrl, &estimate, &pr_cookie ) != LDAP_SUCCESS ) { + if ( ldap_parse_pageresponse_control( ld, ctrl, &estimate, &pr_cookie ) + != LDAP_SUCCESS ) + { /* error? */ return 1; diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 409138a340..c49a48b7be 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -851,7 +851,9 @@ getNextPage: return EXIT_FAILURE; } - if ( ldap_create_page_control_value( ld, pageSize, &pr_cookie, &c[i].ldctl_value ) ) { + if ( ldap_create_page_control_value( ld, + pageSize, &pr_cookie, &c[i].ldctl_value ) ) + { return EXIT_FAILURE; } diff --git a/include/ldap.h b/include/ldap.h index b692a44b48..5d77555225 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -2017,8 +2017,8 @@ LDAP_F( int ) ldap_parse_passwordpolicy_control LDAP_P(( LDAP *ld, LDAPControl *ctrl, - int *expirep, - int *gracep, + ber_int_t *expirep, + ber_int_t *gracep, LDAPPasswordPolicyError *errorp )); LDAP_F( const char * ) @@ -2035,12 +2035,12 @@ LDAP_F( int ) ldap_parse_refresh LDAP_P(( LDAP *ld, LDAPMessage *res, - int *newttl )); + ber_int_t *newttl )); LDAP_F( int ) ldap_refresh LDAP_P(( LDAP *ld, struct berval *dn, - int ttl, + ber_int_t ttl, LDAPControl **sctrls, LDAPControl **cctrls, int *msgidp )); @@ -2049,8 +2049,8 @@ LDAP_F( int ) ldap_refresh_s LDAP_P(( LDAP *ld, struct berval *dn, - int ttl, - int *newttl, + ber_int_t ttl, + ber_int_t *newttl, LDAPControl **sctrls, LDAPControl **cctrls )); diff --git a/libraries/libldap/dds.c b/libraries/libldap/dds.c index 3ec8d65150..6897054590 100644 --- a/libraries/libldap/dds.c +++ b/libraries/libldap/dds.c @@ -27,7 +27,7 @@ #include "ldap-int.h" int -ldap_parse_refresh( LDAP *ld, LDAPMessage *res, int *newttl ) +ldap_parse_refresh( LDAP *ld, LDAPMessage *res, ber_int_t *newttl ) { int rc; struct berval *retdata = NULL; @@ -83,7 +83,7 @@ int ldap_refresh( LDAP *ld, struct berval *dn, - int ttl, + ber_int_t ttl, LDAPControl **sctrls, LDAPControl **cctrls, int *msgidp ) @@ -129,8 +129,8 @@ int ldap_refresh_s( LDAP *ld, struct berval *dn, - int ttl, - int *newttl, + ber_int_t ttl, + ber_int_t *newttl, LDAPControl **sctrls, LDAPControl **cctrls ) { @@ -139,13 +139,10 @@ ldap_refresh_s( LDAPMessage *res; rc = ldap_refresh( ld, dn, ttl, sctrls, cctrls, &msgid ); - if ( rc != LDAP_SUCCESS ) { - return rc; - } - - if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *)NULL, &res ) == -1 ) { - return ld->ld_errno; - } + if ( rc != LDAP_SUCCESS ) return rc; + + rc = ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *)NULL, &res ); + if( rc == -1 ) return ld->ld_errno; rc = ldap_parse_refresh( ld, res, newttl ); if( rc != LDAP_SUCCESS ) { @@ -153,6 +150,6 @@ ldap_refresh_s( return rc; } - return( ldap_result2error( ld, res, 1 ) ); + return ldap_result2error( ld, res, 1 ); } diff --git a/libraries/libldap/ppolicy.c b/libraries/libldap/ppolicy.c index cdac7e0007..8898a9f0cd 100644 --- a/libraries/libldap/ppolicy.c +++ b/libraries/libldap/ppolicy.c @@ -125,8 +125,8 @@ int ldap_parse_passwordpolicy_control( LDAP *ld, LDAPControl *ctrl, - int *expirep, - int *gracep, + ber_int_t *expirep, + ber_int_t *gracep, LDAPPasswordPolicyError *errorp ) { BerElement *ber;