From: Douglas Bagnall Date: Fri, 12 Apr 2024 06:11:12 +0000 (+1200) Subject: ldb:tools: ldbsearch doesn't need ldb_qsort() X-Git-Tag: tdb-1.4.11~830 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f995ab887a487df2213cbb7e9f79a09346e86ba;p=thirdparty%2Fsamba.git ldb:tools: ldbsearch doesn't need ldb_qsort() When the opaque context blob is not used, we might as well use a real qsort(). Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/tools/ldbsearch.c b/lib/ldb/tools/ldbsearch.c index 374f2405e47..a0c74b175fa 100644 --- a/lib/ldb/tools/ldbsearch.c +++ b/lib/ldb/tools/ldbsearch.c @@ -45,8 +45,7 @@ static void usage(struct ldb_context *ldb) } static int do_compare_msg(struct ldb_message **el1, - struct ldb_message **el2, - void *opaque) + struct ldb_message **el2) { return ldb_dn_compare((*el1)->dn, (*el2)->dn); } @@ -269,7 +268,7 @@ again: unsigned int i; if (sctx->num_stored) { - LDB_TYPESAFE_QSORT(sctx->store, sctx->num_stored, ldb, do_compare_msg); + TYPESAFE_QSORT(sctx->store, sctx->num_stored, do_compare_msg); } for (i = 0; i < sctx->num_stored; i++) { display_message(sctx->store[i], sctx);