From: Kurt Zeilenga Date: Wed, 26 Jul 2000 23:18:49 +0000 (+0000) Subject: Clean up at_find X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2345 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f1d0813562dff3617505e8934c932934b5f8f12a;p=openldap Clean up at_find --- diff --git a/servers/slapd/at.c b/servers/slapd/at.c index 5c08f723fb..811dd59803 100644 --- a/servers/slapd/at.c +++ b/servers/slapd/at.c @@ -74,23 +74,12 @@ at_find( 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