mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 15:19:34 -05:00
Minor clean of assert() and comments.
This commit is contained in:
parent
cbf50f4e11
commit
ca00536233
1 changed files with 3 additions and 8 deletions
|
|
@ -55,7 +55,6 @@ ber_memfree( void *p )
|
||||||
{
|
{
|
||||||
ber_int_options.lbo_valid = LBER_INITIALIZED;
|
ber_int_options.lbo_valid = LBER_INITIALIZED;
|
||||||
|
|
||||||
/* ignore p == NULL when not debugging */
|
|
||||||
if( p == NULL ) {
|
if( p == NULL ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -110,11 +109,9 @@ ber_memalloc( size_t s )
|
||||||
ber_int_options.lbo_valid = LBER_INITIALIZED;
|
ber_int_options.lbo_valid = LBER_INITIALIZED;
|
||||||
|
|
||||||
#ifdef LDAP_MEMORY_DEBUG
|
#ifdef LDAP_MEMORY_DEBUG
|
||||||
/* catch s == 0 when debugging */
|
assert( s != 0 );
|
||||||
assert( s );
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ignore s == 0 when not debugging */
|
|
||||||
if( s == 0 ) {
|
if( s == 0 ) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -146,11 +143,9 @@ ber_memcalloc( size_t n, size_t s )
|
||||||
ber_int_options.lbo_valid = LBER_INITIALIZED;
|
ber_int_options.lbo_valid = LBER_INITIALIZED;
|
||||||
|
|
||||||
#ifdef LDAP_MEMORY_DEBUG
|
#ifdef LDAP_MEMORY_DEBUG
|
||||||
/* catch s,n == 0 when debugging */
|
assert( n != 0 && s != 0);
|
||||||
assert( n && s );
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ignore s,n == 0 when not debugging */
|
|
||||||
if( n == 0 || s == 0 ) {
|
if( n == 0 || s == 0 ) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -310,7 +305,7 @@ ber_strdup( LDAP_CONST char *s )
|
||||||
|
|
||||||
len = strlen( s ) + 1;
|
len = strlen( s ) + 1;
|
||||||
|
|
||||||
if ( (p = (char *) LBER_MALLOC( len )) == NULL ) {
|
if ( (p = LBER_MALLOC( len )) == NULL ) {
|
||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue