summaryrefslogtreecommitdiff
path: root/source4/torture/raw/search.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-13 13:01:08 +1100
committerAndrew Tridgell <tridge@samba.org>2010-02-13 22:36:12 +1100
commit700f4649511dbef417e639509d2f3374b5c8c6f3 (patch)
tree1df983dacd7e07e6c4cc06360531f47f05d4f0dc /source4/torture/raw/search.c
parentf954f522a457a44e7b298e553907d59d670c9051 (diff)
downloadsamba-700f4649511dbef417e639509d2f3374b5c8c6f3.tar.gz
samba-700f4649511dbef417e639509d2f3374b5c8c6f3.tar.bz2
samba-700f4649511dbef417e639509d2f3374b5c8c6f3.zip
s4-torture: use TYPESAFE_QSORT() in smbtorture
Diffstat (limited to 'source4/torture/raw/search.c')
-rw-r--r--source4/torture/raw/search.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index dec7da0751..493039a307 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -23,6 +23,7 @@
#include "libcli/raw/raw_proto.h"
#include "libcli/libcli.h"
#include "torture/util.h"
+#include "lib/util/tsort.h"
#define BASEDIR "\\testsearch"
@@ -733,8 +734,7 @@ static bool test_many_files(struct torture_context *tctx,
compare_data_level = search_types[t].data_level;
- qsort(result.list, result.count, sizeof(result.list[0]),
- QSORT_CAST search_compare);
+ TYPESAFE_QSORT(result.list, result.count, search_compare);
for (i=0;i<result.count;i++) {
const char *s;
@@ -1345,8 +1345,7 @@ static bool test_ea_list(struct torture_context *tctx,
/* we have to sort the result as different servers can return directories
in different orders */
- qsort(result.list, result.count, sizeof(result.list[0]),
- (comparison_fn_t)ealist_cmp);
+ TYPESAFE_QSORT(result.list, result.count, ealist_cmp);
CHECK_VALUE(result.count, 3);
CHECK_VALUE(result.list[0].ea_list.eas.num_eas, 2);