Allow ctrls argument to be NULL.

This commit is contained in:
Kurt Zeilenga 1999-06-28 22:47:20 +00:00
parent 5045f15b23
commit 64d5725662

View file

@ -117,8 +117,10 @@ int ldap_int_get_controls(
char *opaque;
assert( ber != NULL );
assert( ctrls != NULL );
if( ctrls == NULL ) {
return LDAP_SUCCESS;
}
*ctrls = NULL;
len = ber_pvt_ber_remaining(ber);
@ -128,6 +130,7 @@ int ldap_int_get_controls(
return LDAP_SUCCESS;
}
if(( tag = ber_peek_tag( ber, &len )) != LDAP_TAG_CONTROLS ) {
if( tag == LBER_ERROR ) {
/* decoding error */