From e5c83e1adba59416a31fd78aaea6c99fff499ddd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 13 Feb 2010 13:00:41 +1100 Subject: s4-ntvfs: use TYPESAFE_QSORT() in notify code --- source4/ntvfs/common/notify.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4') 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; -- cgit