mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
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 <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b37186cf91
commit
7f995ab887
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user