From f1d0813562dff3617505e8934c932934b5f8f12a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 26 Jul 2000 23:18:49 +0000 Subject: [PATCH] Clean up at_find --- servers/slapd/at.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) 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 -- 2.39.5