]> git.sur5r.net Git - openldap/commitdiff
Clean up at_find
authorKurt Zeilenga <kurt@openldap.org>
Wed, 26 Jul 2000 23:18:49 +0000 (23:18 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 26 Jul 2000 23:18:49 +0000 (23:18 +0000)
servers/slapd/at.c

index 5c08f723fbc822df4bf3dd6e92d21bee0d4171c9..811dd59803bbaa5fbcdea3c92244d561b7cb0b5b 100644 (file)
@@ -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