From: Hallvard Furuseth Date: Sun, 10 Jul 2005 09:40:34 +0000 (+0000) Subject: ber_get_enum() needs int*, not enum*. An enum can have wrong size. X-Git-Tag: OPENLDAP_AC_BP~428 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bdbda6a23177dab6451d67cb0dfdd9ad851b16ec;p=openldap ber_get_enum() needs int*, not enum*. An enum can have wrong size. (Enum _members_ have type int, but the enum's _type_ can be compatible with some other char/integer type which can represent its members.) --- diff --git a/libraries/libldap/ppolicy.c b/libraries/libldap/ppolicy.c index a54181dca6..d730f93cdf 100644 --- a/libraries/libldap/ppolicy.c +++ b/libraries/libldap/ppolicy.c @@ -134,7 +134,7 @@ ldap_parse_passwordpolicy_control( 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 ) ); @@ -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;