From: Howard Chu Date: Thu, 3 Jan 2002 05:41:50 +0000 (+0000) Subject: Changed AttributeName back into an array instead of a linked list X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~323 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=265a03c7bd337ad4d27b717da148a465fbe36ed1;p=openldap Changed AttributeName back into an array instead of a linked list --- diff --git a/servers/slapd/back-perl/search.c b/servers/slapd/back-perl/search.c index e3b5928aae..1e71424d67 100644 --- a/servers/slapd/back-perl/search.c +++ b/servers/slapd/back-perl/search.c @@ -66,7 +66,7 @@ perl_back_search( XPUSHs(sv_2mortal(newSViv( timelimit ))); XPUSHs(sv_2mortal(newSViv( attrsonly ))); - for ( an = attrs; an; an = an->an_next ) { + for ( an = attrs; an && an->an_name.bv_val; an++ ) { XPUSHs(sv_2mortal(newSVpv( an->an_name.bv_val , 0))); } PUTBACK; diff --git a/servers/slapd/back-sql/search.c b/servers/slapd/back-sql/search.c index e3edcd036a..cf68f8c128 100644 --- a/servers/slapd/back-sql/search.c +++ b/servers/slapd/back-sql/search.c @@ -62,7 +62,7 @@ void backsql_init_search(backsql_srch_info *bsi,backsql_info *bi,char *nbase,int { bsi->attrs=(char**)ch_calloc(1,sizeof(char*)); bsi->attrs[0]=NULL; - for(p=attrs;p!=NULL;p=p->an_next) + for(p=attrs;p->an_name.bv_val;p++) backsql_attrlist_add(bsi,p->an_name.bv_val); } else diff --git a/servers/slapd/back-tcl/tcl_search.c b/servers/slapd/back-tcl/tcl_search.c index f807dba16f..0764900d85 100644 --- a/servers/slapd/back-tcl/tcl_search.c +++ b/servers/slapd/back-tcl/tcl_search.c @@ -46,10 +46,10 @@ tcl_back_search ( return (-1); } - for (i = 0, an = attrs; an != NULL; an=an->an_next, i++); + for (i = 0, an = attrs; an && an->an_name.bv_val; an++, i++); if (i > 0) { sattrs = ch_malloc( (i+1) * sizeof(char *)); - for (i = 0, an = attrs; an; an=an->an_next, i++) + for (i = 0, an = attrs; an->an_name.bv_val; an++, i++) sattrs[i] = an->an_name.bv_val; sattrs[i] = NULL; attrs_tcl = Tcl_Merge (i, sattrs);