From ca0053623366169bb7d8fb2db4ab6a0be99d33cf Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 7 Jun 1999 23:12:34 +0000 Subject: [PATCH] Minor clean of assert() and comments. --- libraries/liblber/memory.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libraries/liblber/memory.c b/libraries/liblber/memory.c index 4be2072b61..30d1e3584c 100644 --- a/libraries/liblber/memory.c +++ b/libraries/liblber/memory.c @@ -55,7 +55,6 @@ ber_memfree( void *p ) { ber_int_options.lbo_valid = LBER_INITIALIZED; - /* ignore p == NULL when not debugging */ if( p == NULL ) { return; } @@ -110,11 +109,9 @@ ber_memalloc( size_t s ) ber_int_options.lbo_valid = LBER_INITIALIZED; #ifdef LDAP_MEMORY_DEBUG - /* catch s == 0 when debugging */ - assert( s ); + assert( s != 0 ); #endif - /* ignore s == 0 when not debugging */ if( s == 0 ) { return NULL; } @@ -146,11 +143,9 @@ ber_memcalloc( size_t n, size_t s ) ber_int_options.lbo_valid = LBER_INITIALIZED; #ifdef LDAP_MEMORY_DEBUG - /* catch s,n == 0 when debugging */ - assert( n && s ); + assert( n != 0 && s != 0); #endif - /* ignore s,n == 0 when not debugging */ if( n == 0 || s == 0 ) { return NULL; } @@ -310,7 +305,7 @@ ber_strdup( LDAP_CONST char *s ) len = strlen( s ) + 1; - if ( (p = (char *) LBER_MALLOC( len )) == NULL ) { + if ( (p = LBER_MALLOC( len )) == NULL ) { return( NULL ); } -- 2.39.5