]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/ppolicy.c
improve LDAP_OTHER description
[openldap] / libraries / libldap / ppolicy.c
index e77a7c47ded48eff94d51081eef39dee22163d93..0092cd8fcf8d7106be9045b7f12d83a680f484e9 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004 The OpenLDAP Foundation.
+ * Copyright 2004-2005 The OpenLDAP Foundation.
  * Portions Copyright 2004 Hewlett-Packard Company.
  * Portions Copyright 2004 Howard Chu, Symas Corp.
  * All rights reserved.
@@ -130,15 +130,15 @@ ldap_parse_passwordpolicy_control(
         LDAPPasswordPolicyError *errorp )
 {
        BerElement  *ber;
-       int i, exp = -1, grace = -1;
+       int exp = -1, grace = -1;
        ber_tag_t tag;
        ber_len_t berLen;
         char *last;
-        LDAPPasswordPolicyError err = PP_noError;
+       int err = PP_noError;
         
        assert( ld != NULL );
        assert( LDAP_VALID( ld ) );
-       assert( ctrl );
+       assert( ctrl != NULL );
 
        /* Create a BerElement from the berval returned in the control. */
        ber = ber_init(&ctrl->ldctl_value);
@@ -172,7 +172,7 @@ ldap_parse_passwordpolicy_control(
                     
                     break;
                 case PPOLICY_ERROR:
-                    if (ber_get_enum( ber, (int *)&err ) == LBER_DEFAULT) goto exit;
+                    if (ber_get_enum( ber, &err ) == LBER_DEFAULT) goto exit;
                     break;
                 default:
                     goto exit;