Remove lint and sync with devel, no functional changes

This commit is contained in:
Kurt Zeilenga 2000-09-15 18:13:51 +00:00
parent bad43369e1
commit 5930d0e64c
5 changed files with 33 additions and 21 deletions

View File

@ -61,8 +61,9 @@ struct berelement {
};
#define BER_VALID(ber) ((ber)->ber_valid==LBER_VALID_BERELEMENT)
#define ber_pvt_ber_bytes(ber) ((ber)->ber_ptr - (ber)->ber_buf)
#define ber_pvt_ber_remaining(ber) ((ber)->ber_end - (ber)->ber_ptr)
#define ber_pvt_ber_total(ber) ((ber)->ber_end - (ber)->ber_buf)
#define ber_pvt_ber_write(ber) ((ber)->ber_ptr - (ber)->ber_buf)
struct sockbuf {
struct lber_options sb_opts;

View File

@ -71,15 +71,15 @@ ber_get_option(
return LBER_OPT_SUCCESS;
case LBER_OPT_BER_REMAINING_BYTES:
*((ber_len_t *) outvalue) = ber->ber_end - ber->ber_ptr;
*((ber_len_t *) outvalue) = ber_pvt_ber_remaining(ber);
return LBER_OPT_SUCCESS;
case LBER_OPT_BER_TOTAL_BYTES:
*((ber_len_t *) outvalue) = ber->ber_end - ber->ber_buf;
*((ber_len_t *) outvalue) = ber_pvt_ber_total(ber);
return LBER_OPT_SUCCESS;
case LBER_OPT_BER_BYTES_TO_WRITE:
*((ber_len_t *) outvalue) = ber->ber_ptr - ber->ber_buf;
*((ber_len_t *) outvalue) = ber_pvt_ber_write(ber);
return LBER_OPT_SUCCESS;
default:

View File

@ -125,14 +125,13 @@ int ldap_int_get_controls(
}
*ctrls = NULL;
len = ber_pvt_ber_remaining(ber);
len = ber_pvt_ber_remaining( ber );
if( len == 0) {
/* no controls */
return LDAP_SUCCESS;
}
if(( tag = ber_peek_tag( ber, &len )) != LDAP_TAG_CONTROLS ) {
if( tag == LBER_ERROR ) {
/* decoding error */

View File

@ -14,7 +14,6 @@
lutil_sig_t
lutil_sigaction(int sig, lutil_sig_t func)
{
int rc;
struct sigaction action, oaction;
memset( &action, '\0', sizeof(action) );

View File

@ -120,12 +120,13 @@ int octetStringIndexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
for( i=0; values[i] != NULL; i++ ) {
/* just count them */
}
assert( i > 0 );
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
@ -791,12 +792,13 @@ int caseExactIndexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
for( i=0; values[i] != NULL; i++ ) {
/* just count them */
}
assert( i > 0 );
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
@ -891,6 +893,9 @@ int caseExactSubstringsIndexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
nkeys=0;
for( i=0; values[i] != NULL; i++ ) {
/* count number of indices to generate */
@ -922,7 +927,6 @@ int caseExactSubstringsIndexer(
}
}
}
assert( i > 0 );
if( nkeys == 0 ) {
/* no keys to generate */
@ -1358,12 +1362,13 @@ int caseIgnoreIndexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
for( i=0; values[i] != NULL; i++ ) {
/* just count them */
}
assert( i > 0 );
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
@ -1465,6 +1470,9 @@ int caseIgnoreSubstringsIndexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
nkeys=0;
for( i=0; values[i] != NULL; i++ ) {
/* count number of indices to generate */
@ -1496,7 +1504,6 @@ int caseIgnoreSubstringsIndexer(
}
}
}
assert( i > 0 );
if( nkeys == 0 ) {
/* no keys to generate */
@ -2139,12 +2146,13 @@ int caseExactIA5Indexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
for( i=0; values[i] != NULL; i++ ) {
/* just count them */
}
assert( i > 0 );
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
@ -2239,6 +2247,9 @@ int caseExactIA5SubstringsIndexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
nkeys=0;
for( i=0; values[i] != NULL; i++ ) {
/* count number of indices to generate */
@ -2270,7 +2281,6 @@ int caseExactIA5SubstringsIndexer(
}
}
}
assert( i > 0 );
if( nkeys == 0 ) {
/* no keys to generate */
@ -2702,12 +2712,13 @@ int caseIgnoreIA5Indexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
for( i=0; values[i] != NULL; i++ ) {
/* just count them */
}
assert( i > 0 );
keys = ch_malloc( sizeof( struct berval * ) * (i+1) );
slen = strlen( syntax->ssyn_oid );
@ -2809,6 +2820,9 @@ int caseIgnoreIA5SubstringsIndexer(
digest.bv_val = MD5digest;
digest.bv_len = sizeof(MD5digest);
/* we should have at least one value at this point */
assert( values != NULL && values[0] != NULL );
nkeys=0;
for( i=0; values[i] != NULL; i++ ) {
/* count number of indices to generate */
@ -2840,7 +2854,6 @@ int caseIgnoreIA5SubstringsIndexer(
}
}
}
assert( i > 0 );
if( nkeys == 0 ) {
/* no keys to generate */