Minor cleanup

This commit is contained in:
Howard Chu 2001-12-26 06:21:06 +00:00
parent 7685b237b7
commit 34214776d1
2 changed files with 3 additions and 3 deletions

View File

@ -122,7 +122,7 @@ int slap_bv2ad(
if ( options != NULL )
i = options - name;
else
i = strlen(name);
i = bv->bv_len - (name - bv->bv_val);
if( i == sizeof("binary")-1 && strncasecmp( name, "binary", i) == 0 ) {
if( slap_ad_is_binary( &desc ) ) {

View File

@ -32,7 +32,7 @@ bdb_dn2id_add(
assert( e->e_id != NOID );
DBTzero( &key );
key.size = strlen( e->e_ndn ) + 2;
key.size = e->e_nname.bv_len + 2;
buf = ch_malloc( key.size );
key.data = buf;
buf[0] = DN_BASE_PREFIX;
@ -121,7 +121,7 @@ bdb_dn2id_delete(
e->e_ndn, e->e_id, 0 );
DBTzero( &key );
key.size = strlen( e->e_ndn ) + 2;
key.size = e->e_nname.bv_len + 2;
buf = ch_malloc( key.size );
key.data = buf;
key.flags = DB_DBT_USERMEM;