lkml.org 
[lkml]   [2005]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] lib/sort: Replace qsort in XFS
On Tue, Feb 01, 2005 at 02:29:15PM -0800, Chris Wedgwood wrote:
> 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)

Side-effect avoidance habit, not applicable here.

> 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?

Was it? Grumble. Ok, I'll fix these up.

--
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.065 / U:21.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site