if ( dd ) {
len = snprintf( ptr, size, "%d+", dd );
- assert( len >= 0 && len < size );
+ assert( len >= 0 && (unsigned) len < size );
size -= len;
ptr += len;
}
len = snprintf( ptr, size, "%02d:%02d", hh, mm );
- assert( len >= 0 && len < size );
+ assert( len >= 0 && (unsigned) len < size );
size -= len;
ptr += len;
if ( ss ) {
len = snprintf( ptr, size, ":%02d", ss );
- assert( len >= 0 && len < size );
+ assert( len >= 0 && (unsigned) len < size );
size -= len;
ptr += len;
}
a = attr_find( rs->sr_entry->e_attrs,
slap_schema.si_ad_entryCSN );
if ( a ) {
- int len = a->a_vals[0].bv_len;
+ ber_len_t len = a->a_vals[0].bv_len;
if ( len > pd->csn.bv_len )
len = pd->csn.bv_len;
if ( memcmp( a->a_vals[0].bv_val, pd->csn.bv_val, len ) > 0 ) {
struct berval *valp )
{
struct berval val, bv;
- int i;
+ ber_len_t i;
int rc = LDAP_SUCCESS;
assert( valp != NULL );
}
if ( !BER_BVISNULL( &ctrls[ i ]->ldctl_value ) ) {
- int j;
+ ber_len_t j;
ptr = lutil_strcopy( ptr, " controlValue \"" );
for ( j = 0; j < ctrls[ i ]->ldctl_value.bv_len; j++ )
ptr = lutil_strcopy( ptr, dli->dli_oc->soc_cname.bv_val );
ptr = lutil_strcopy( ptr, "))" );
- assert( dli->dli_default_filter.bv_len == ptr - dli->dli_default_filter.bv_val );
+ assert( ptr == &dli->dli_default_filter.bv_val[dli->dli_default_filter.bv_len] );
return 0;
}
}
ber_printf( ber, /*{*/ "N}" );
- if (ber_flatten2( ber, &(c.ldctl_value), 1 ) == LBER_DEFAULT) {
+ if (ber_flatten2( ber, &(c.ldctl_value), 1 ) == -1) {
return NULL;
}
(void)ber_free_buf(ber);
{
char *ptr;
struct berval nv, npw;
- int i, j;
+ ber_len_t i, j;
assert (bv && (bv->bv_len > 0) && (bv->bv_val) && oldtime && oldpw );