diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-14 10:37:20 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-14 18:44:20 +1100 |
commit | 282cc79454f7b708085a04d04e98d11ffec8b293 (patch) | |
tree | d91205910306d6a7f39dc3a10e283405a701bee2 /source4/lib/ldb/common | |
parent | 0c39fbc94ed6ad3aa18a6b3c15743707236f35c3 (diff) | |
download | samba-282cc79454f7b708085a04d04e98d11ffec8b293.tar.gz samba-282cc79454f7b708085a04d04e98d11ffec8b293.tar.bz2 samba-282cc79454f7b708085a04d04e98d11ffec8b293.zip |
s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb code
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r-- | source4/lib/ldb/common/ldb_dn.c | 4 | ||||
-rw-r--r-- | source4/lib/ldb/common/ldb_msg.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c index 252a0c632b..c395be2900 100644 --- a/source4/lib/ldb/common/ldb_dn.c +++ b/source4/lib/ldb/common/ldb_dn.c @@ -824,8 +824,8 @@ char *ldb_dn_get_extended_linearized(void *mem_ctx, struct ldb_dn *dn, int mode) * the resulting DNs consistent, plus to ensure that we put * 'DELETED' first, so it can be very quickly recognised */ - qsort(dn->ext_components, dn->ext_comp_num, sizeof(dn->ext_components[0]), - ldb_dn_extended_component_compare); + TYPESAFE_QSORT(dn->ext_components, dn->ext_comp_num, + ldb_dn_extended_component_compare); for (i = 0; i < dn->ext_comp_num; i++) { const struct ldb_dn_extended_syntax *ext_syntax; diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c index 9f90f33405..f4adb560b1 100644 --- a/source4/lib/ldb/common/ldb_msg.c +++ b/source4/lib/ldb/common/ldb_msg.c @@ -464,8 +464,8 @@ struct ldb_dn *ldb_msg_find_attr_as_dn(struct ldb_context *ldb, */ void ldb_msg_sort_elements(struct ldb_message *msg) { - qsort(msg->elements, msg->num_elements, sizeof(struct ldb_message_element), - (comparison_fn_t)ldb_msg_element_compare_name); + TYPESAFE_QSORT(msg->elements, msg->num_elements, + ldb_msg_element_compare_name); } /* |