const char *name
)
{
- struct aindexrec *air;
- char *tmpname;
-
- {
- tmpname = (char *)name;
- }
+ struct aindexrec *air;
- if ( (air = (struct aindexrec *) avl_find( attr_index, tmpname,
- (AVL_CMP) attr_index_name_cmp )) != NULL ) {
- if ( tmpname != name )
- ldap_memfree( tmpname );
- return( air->air_at );
- }
+ air = (struct aindexrec *) avl_find( attr_index, name,
+ (AVL_CMP) attr_index_name_cmp );
- if ( tmpname != name )
- ldap_memfree( tmpname );
- return( NULL );
+ return air != NULL ? air->air_at : NULL;
}
int
return SLAP_SCHERR_ATTR_INCOMPLETE;
}
sat = (AttributeType *) ch_calloc( 1, sizeof(AttributeType) );
- memcpy( &sat->sat_atype, at, sizeof(LDAPAttributeType));
+ AC_MEMCPY( &sat->sat_atype, at, sizeof(LDAPAttributeType));
sat->sat_cname = cname;