From: Hallvard Furuseth Date: Wed, 3 Mar 1999 15:35:29 +0000 (+0000) Subject: Back out previous change; it was an accidental commit X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~520 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e6851440953a44c34ccf839cca6e9abe23b565d;p=openldap Back out previous change; it was an accidental commit --- diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index a96b1946c2..b94c5cf926 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -198,7 +198,7 @@ ber_get_stringb( BerElement *ber, char *buf, unsigned long *len ) #ifdef STR_TRANSLATION if ( datalen > 0 && ( ber->ber_options & LBER_TRANSLATE_STRINGS ) != 0 - && ber->ber_decode_translate_proc != 0 ) { + && ber->ber_decode_translate_proc != NULL ) { transbuf = buf; ++datalen; if ( (*(ber->ber_decode_translate_proc))( &transbuf, &datalen, @@ -241,7 +241,7 @@ ber_get_stringa( BerElement *ber, char **buf ) #ifdef STR_TRANSLATION if ( datalen > 0 && ( ber->ber_options & LBER_TRANSLATE_STRINGS ) != 0 - && ber->ber_decode_translate_proc != 0 ) { + && ber->ber_decode_translate_proc != NULL ) { ++datalen; if ( (*(ber->ber_decode_translate_proc))( buf, &datalen, 1 ) != 0 ) { @@ -284,7 +284,7 @@ ber_get_stringal( BerElement *ber, struct berval **bv ) #ifdef STR_TRANSLATION if ( len > 0 && ( ber->ber_options & LBER_TRANSLATE_STRINGS ) != 0 - && ber->ber_decode_translate_proc != 0 ) { + && ber->ber_decode_translate_proc != NULL ) { ++len; if ( (*(ber->ber_decode_translate_proc))( &((*bv)->bv_val), &len, 1 ) != 0 ) { diff --git a/libraries/liblber/dtest.c b/libraries/liblber/dtest.c index beeac06718..df683a0ec7 100644 --- a/libraries/liblber/dtest.c +++ b/libraries/liblber/dtest.c @@ -28,7 +28,7 @@ #include #endif /* MACOS */ -#include "lber-int.h" +#include static void usage( char *name ) { @@ -62,7 +62,7 @@ main( int argc, char **argv ) } printf( "message has tag 0x%x and length %ld\n", tag, len ); - if ( ber_scanf( ber, "i", &i ) == LBER_ERROR ) { + if ( ber_scanf( ber, "i", &i ) == -1 ) { fprintf( stderr, "ber_scanf returns -1\n" ); exit( 1 ); } diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 913c0d23a2..55cde46cc5 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -231,7 +231,7 @@ ber_put_ostring( BerElement *ber, char *str, unsigned long len, #ifdef STR_TRANSLATION if ( len > 0 && ( ber->ber_options & LBER_TRANSLATE_STRINGS ) != 0 && - ber->ber_encode_translate_proc != 0 ) { + ber->ber_encode_translate_proc != NULL ) { if ( (*(ber->ber_encode_translate_proc))( &str, &len, 0 ) != 0 ) { return( -1 ); diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 8032c7ce91..dd8bc5f14f 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -237,7 +237,7 @@ ber_dup( BerElement *ber ) void ber_init_w_nullc( BerElement *ber, int options ) { - (void) memset( (char *)ber, '\0', sizeof( BerElement )); /* ### Bug: Expects pointers to have 00000 bit pattern */ + (void) memset( (char *)ber, '\0', sizeof( BerElement )); ber->ber_tag = LBER_DEFAULT; ber->ber_options = (char) options; } diff --git a/libraries/liblber/lber-int.h b/libraries/liblber/lber-int.h index 719f329da4..aeab66b2ba 100644 --- a/libraries/liblber/lber-int.h +++ b/libraries/liblber/lber-int.h @@ -166,14 +166,6 @@ LDAP_F int lber_log_sos_dump LDAP_P(( int loglvl, Seqorset *sos )); -/* io.c */ -LDAP_F Sockbuf *lber_pvt_sb_alloc LDAP_P(( void )); -LDAP_F Sockbuf *lber_pvt_sb_alloc_fd LDAP_P(( int )); -LDAP_F Sockbuf *lber_pvt_sb_alloc_fd LDAP_P(( int )); -LDAP_F void lber_pvt_sb_free LDAP_P(( Sockbuf * )); -LDAP_F int lber_pvt_sb_get_option LDAP_P(( Sockbuf *, int, void * )); -LDAP_F int lber_pvt_sb_set_option LDAP_P(( Sockbuf *, int, void * )); - /* sockbuf.c */ LDAP_F int lber_pvt_sb_init LDAP_P(( Sockbuf *sb )); diff --git a/libraries/liblber/sockbuf.c b/libraries/liblber/sockbuf.c index 28f28b979c..8902af162d 100644 --- a/libraries/liblber/sockbuf.c +++ b/libraries/liblber/sockbuf.c @@ -486,8 +486,8 @@ long lber_pvt_sb_write( Sockbuf *sb, void *buf, long len_arg ) int lber_pvt_sb_close( Sockbuf *sb ) { int ret; - assert( sb->sb_io != NULL ); - assert( sb->sb_io->sbi_close != NULL ); + assert( sb->sb_io ); + assert( sb->sb_io->sbi_close ); assert( status_is_ok(sb) ); assert( lber_pvt_sb_in_use( sb ) );