From: Kurt Zeilenga Date: Fri, 28 Jan 2000 20:10:25 +0000 (+0000) Subject: Fix -DSLAPD_SCHEMA_NOT_COMPAT syntax error in last commit X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3227 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=17f1024ad50c726f7febbb35039f9ce38400acc8;p=openldap Fix -DSLAPD_SCHEMA_NOT_COMPAT syntax error in last commit --- diff --git a/servers/slapd/back-ldbm/tools.c b/servers/slapd/back-ldbm/tools.c index 4f31019664..4050197680 100644 --- a/servers/slapd/back-ldbm/tools.c +++ b/servers/slapd/back-ldbm/tools.c @@ -199,6 +199,9 @@ int ldbm_tool_index_attr( static DBCache *db = NULL; int indexmask, syntaxmask; char * at_cn; +#ifndef SLAPD_SCHEMA_COMPAT + AttributeType *at; +#endif assert( slapMode & SLAP_TOOL_MODE ); @@ -214,19 +217,17 @@ int ldbm_tool_index_attr( return 0; } #else - { - AttributeType *at = at_find( type ); + at = at_find( type ); - if( at == NULL ) { - Debug( LDAP_DEBUG_ANY, - "<= index_attr NULL (could not find attribute type %s)\n", - type, 0, 0 ); - return 0; - } - - at_cn = at_canonical_name( at ); + if( at == NULL ) { + Debug( LDAP_DEBUG_ANY, + "<= index_attr NULL (could not find attribute type %s)\n", + type, 0, 0 ); + return 0; } + at_cn = at_canonical_name( at ); + if( at_cn ) { Debug( LDAP_DEBUG_ANY, "<= index_attr NULL (attribute type %s (%s) has no canonical name)\n", at->sat_oid, type, 0 );