summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-13 13:00:41 +1100
committerAndrew Tridgell <tridge@samba.org>2010-02-13 22:36:12 +1100
commite5c83e1adba59416a31fd78aaea6c99fff499ddd (patch)
treeaa2fe651333cd854562f05568d8bacf2639fd6c6 /source4/ntvfs
parent828b5cd451f88ef267eb3b0dcf819b389ad55ed9 (diff)
downloadsamba-e5c83e1adba59416a31fd78aaea6c99fff499ddd.tar.gz
samba-e5c83e1adba59416a31fd78aaea6c99fff499ddd.tar.bz2
samba-e5c83e1adba59416a31fd78aaea6c99fff499ddd.zip
s4-ntvfs: use TYPESAFE_QSORT() in notify code
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/common/notify.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index 135458a00f..7c6615e3a6 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -36,6 +36,7 @@
#include "ntvfs/sysdep/sys_notify.h"
#include "cluster/cluster.h"
#include "param/param.h"
+#include "lib/util/tsort.h"
struct notify_context {
struct tdb_wrap *w;
@@ -328,9 +329,7 @@ static NTSTATUS notify_add_array(struct notify_context *notify, struct notify_en
d->max_mask |= e->filter;
d->max_mask_subdir |= e->subdir_filter;
- if (d->num_entries > 1) {
- qsort(d->entries, d->num_entries, sizeof(d->entries[0]), notify_compare);
- }
+ TYPESAFE_QSORT(d->entries, d->num_entries, notify_compare);
/* recalculate the maximum masks */
d->max_mask = 0;