mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-24 07:43:16 -05:00
Cleanup NULL derefs
This commit is contained in:
parent
aa87b9ad2e
commit
2d4da0b23c
3 changed files with 13 additions and 10 deletions
|
|
@ -65,8 +65,9 @@ ldap_create_page_control_value(
|
|||
if ( ld == NULL || value == NULL ||
|
||||
pagesize < 1 || pagesize > LDAP_MAXINT )
|
||||
{
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return ld->ld_errno;
|
||||
if ( ld )
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return LDAP_PARAM_ERROR;
|
||||
}
|
||||
|
||||
assert( LDAP_VALID( ld ) );
|
||||
|
|
@ -195,8 +196,9 @@ ldap_parse_pageresponse_control(
|
|||
ber_int_t count;
|
||||
|
||||
if ( ld == NULL || ctrl == NULL || cookie == NULL ) {
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return ld->ld_errno;
|
||||
if ( ld )
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return LDAP_PARAM_ERROR;
|
||||
}
|
||||
|
||||
/* Create a BerElement from the berval returned in the control. */
|
||||
|
|
|
|||
|
|
@ -297,8 +297,9 @@ ldap_create_sort_control_value(
|
|||
ber_tag_t tag;
|
||||
|
||||
if ( ld == NULL || keyList == NULL || value == NULL ) {
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return ld->ld_errno;
|
||||
if ( ld )
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return LDAP_PARAM_ERROR;
|
||||
}
|
||||
|
||||
assert( LDAP_VALID( ld ) );
|
||||
|
|
@ -496,8 +497,7 @@ ldap_parse_sortresponse_control(
|
|||
ber_len_t berLen;
|
||||
|
||||
if (ld == NULL) {
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return(ld->ld_errno);
|
||||
return LDAP_PARAM_ERROR;
|
||||
}
|
||||
|
||||
if (ctrl == NULL) {
|
||||
|
|
|
|||
|
|
@ -95,8 +95,9 @@ ldap_create_vlv_control_value(
|
|||
BerElement *ber;
|
||||
|
||||
if ( ld == NULL || vlvinfop == NULL || value == NULL ) {
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return ld->ld_errno;
|
||||
if ( ld )
|
||||
ld->ld_errno = LDAP_PARAM_ERROR;
|
||||
return LDAP_PARAM_ERROR;
|
||||
}
|
||||
|
||||
assert( LDAP_VALID( ld ) );
|
||||
|
|
|
|||
Loading…
Reference in a new issue