On Mon, Jan 31, 2005 at 01:34:59AM -0600, Matt Mackall wrote:
+#define qsort xfs_sort
+static inline void xfs_sort(void *a, size_t n, size_t s,
+ int (*cmp)(const void *,const void *))
+{
+ sort(a, n, s, cmp, 0);
+}
+
why not just:
#define qsort(a, n, s, cmp) sort(a, n, s, cmp, NULL)
On Mon, Jan 31, 2005 at 01:35:00AM -0600, Matt Mackall wrote:
Switch NFS ACLs to lib/sort
+ sort(acl->a_entries, acl->a_count, sizeof(struct posix_acl_entry),
+ cmp_acl_entry, 0);
There was a thread about stlye and I though the concensurs for null
pointers weas to use NULL and not 0?
On Mon, Jan 31, 2005 at 01:35:00AM -0600, Matt Mackall wrote:
Eep. cpuset uses bubble sort on a data set that's potentially O(#
processes). Switch to lib/sort.
+ sort(pidarray, npids, sizeof(pid_t), cmppid, 0);
and there?
On Mon, Jan 31, 2005 at 01:35:00AM -0600, Matt Mackall wrote:
Replace exception table insertion sort with lib/sort
+ sort(start, finish - start, sizeof(struct exception_table_entry),
+ cmp_ex, 0);
and there?