diff lib/fts.c @ 10482:e8d1a5b2c49c

fts: tweak inode comparison function * lib/fts.c (fts_compare_ino): Sort on increasing, not decreasing inode numbers, as documented. SCALAR(0xeb1b20)
author Jim Meyering <meyering@redhat.com>
date Fri, 26 Sep 2008 13:43:00 +0200
parents 47fe4e48e158
children 5e359fc738d5
line wrap: on
line diff
--- a/lib/fts.c	Tue Sep 16 10:05:47 2008 +0200
+++ b/lib/fts.c	Fri Sep 26 13:43:00 2008 +0200
@@ -981,8 +981,8 @@
 static int
 fts_compare_ino (struct _ftsent const **a, struct _ftsent const **b)
 {
-  return (a[0]->fts_statp->st_ino < b[0]->fts_statp->st_ino ? 1
-	  : b[0]->fts_statp->st_ino < a[0]->fts_statp->st_ino ? -1 : 0);
+  return (a[0]->fts_statp->st_ino < b[0]->fts_statp->st_ino ? -1
+	  : b[0]->fts_statp->st_ino < a[0]->fts_statp->st_ino ? 1 : 0);
 }
 
 /*