From bdbda6a23177dab6451d67cb0dfdd9ad851b16ec Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 10 Jul 2005 09:40:34 +0000 Subject: [PATCH] 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.) --- libraries/libldap/ppolicy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5