summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_set.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-15 10:01:26 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-15 10:01:26 -0700
commit8fa5e567e76d4edb818d4cd88886918470d78ad1 (patch)
tree158ae6f521152da00b0bd008aaef2a84e6656259 /source4/dsdb/schema/schema_set.c
parent62dd3aadd7ee9a8abbdd42caaa140105b1b1e8d9 (diff)
downloadsamba-8fa5e567e76d4edb818d4cd88886918470d78ad1.tar.gz
samba-8fa5e567e76d4edb818d4cd88886918470d78ad1.tar.bz2
samba-8fa5e567e76d4edb818d4cd88886918470d78ad1.zip
s4-dsdb: use DLIST_ADD() not DLIST_ADD_END()
Using DLIST_ADD_END() to construct a long list is very inefficient (it is O(n^2). These lists are not ordered, so using DLIST_ADD() is much better.
Diffstat (limited to 'source4/dsdb/schema/schema_set.c')
-rw-r--r--source4/dsdb/schema/schema_set.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index 6745bde127..6f09f63596 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -555,7 +555,7 @@ WERROR dsdb_set_schema_from_ldif(struct ldb_context *ldb, const char *pf, const
goto failed;
}
- DLIST_ADD_END(schema->attributes, sa, struct dsdb_attribute *);
+ DLIST_ADD(schema->attributes, sa);
} else if (is_sc) {
struct dsdb_class *sc;
@@ -569,7 +569,7 @@ WERROR dsdb_set_schema_from_ldif(struct ldb_context *ldb, const char *pf, const
goto failed;
}
- DLIST_ADD_END(schema->classes, sc, struct dsdb_class *);
+ DLIST_ADD(schema->classes, sc);
}
}