diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-13 12:59:43 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-13 22:36:12 +1100 |
commit | 5549190b37a2bfc01f5cbff89da47b7ca4bd84fa (patch) | |
tree | bf93d3c120e6c176cee7574f04e866a447c29814 /source4/dsdb/samdb/ldb_modules/repl_meta_data.c | |
parent | 1373e748aa53fbd3afe4d2377208257d42628d86 (diff) | |
download | samba-5549190b37a2bfc01f5cbff89da47b7ca4bd84fa.tar.gz samba-5549190b37a2bfc01f5cbff89da47b7ca4bd84fa.tar.bz2 samba-5549190b37a2bfc01f5cbff89da47b7ca4bd84fa.zip |
s4-dsdb: use TYPESAFE_QSORT() in dsdb code
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/repl_meta_data.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 67d7094d4c..9fd2c1e617 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -48,6 +48,7 @@ #include "dsdb/samdb/ldb_modules/util.h" #include "lib/util/binsearch.h" #include "libcli/security/security.h" +#include "lib/util/tsort.h" #define W2K3_LINKED_ATTRIBUTES 1 @@ -1278,7 +1279,7 @@ static int get_parsed_dns(struct ldb_module *module, TALLOC_CTX *mem_ctx, p->v = v; } - qsort(*pdn, el->num_values, sizeof((*pdn)[0]), (comparison_fn_t)parsed_dn_compare); + TYPESAFE_QSORT(*pdn, el->num_values, parsed_dn_compare); return LDB_SUCCESS; } @@ -3151,9 +3152,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a /* * sort the cursors */ - qsort(nuv.ctr.ctr2.cursors, nuv.ctr.ctr2.count, - sizeof(struct drsuapi_DsReplicaCursor2), - (comparison_fn_t)drsuapi_DsReplicaCursor2_compare); + TYPESAFE_QSORT(nuv.ctr.ctr2.cursors, nuv.ctr.ctr2.count, drsuapi_DsReplicaCursor2_compare); /* * create the change ldb_message |