diff options
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r-- | source4/lib/ldb/modules/sort.c | 4 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbsearch.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c index 5d1431d739..4ef7a0cecb 100644 --- a/source4/lib/ldb/modules/sort.c +++ b/source4/lib/ldb/modules/sort.c @@ -144,9 +144,7 @@ static int server_sort_results(struct sort_context *ac) ac->a = ldb_schema_attribute_by_name(ldb, ac->attributeName); ac->sort_result = 0; - ldb_qsort(ac->msgs, ac->num_msgs, - sizeof(struct ldb_message *), - ac, (ldb_qsort_cmp_fn_t)sort_compare); + LDB_TYPESAFE_QSORT(ac->msgs, ac->num_msgs, ac, sort_compare); if (ac->sort_result != LDB_SUCCESS) { return ac->sort_result; diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c index 8f7ee1ce38..207b344195 100644 --- a/source4/lib/ldb/tools/ldbsearch.c +++ b/source4/lib/ldb/tools/ldbsearch.c @@ -248,8 +248,7 @@ again: int i; if (sctx->num_stored) { - ldb_qsort(sctx->store, sctx->num_stored, sizeof(struct ldb_message *), - ldb, (ldb_qsort_cmp_fn_t)do_compare_msg); + LDB_TYPESAFE_QSORT(sctx->store, sctx->num_stored, ldb, do_compare_msg); } for (i = 0; i < sctx->num_stored; i++) { display_message(sctx->store[i], sctx); |