about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-02 21:53:23 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-02 21:53:23 +0000
commit78e885103e94a806e07f9683520811065d7a447b (patch)
treee8fab8d872d33673cdefe0af001436bebbc7a406
parent38e68573bc08179bb9418038e7c2db7e576eaea5 (diff)
downloadglibc-78e885103e94a806e07f9683520811065d7a447b.tar.gz
glibc-78e885103e94a806e07f9683520811065d7a447b.tar.xz
glibc-78e885103e94a806e07f9683520811065d7a447b.zip
Update.
2003-01-25  Jim Meyering  <jim@meyering.net>

	* io/ftw.c (object_compare): Compare inode numbers before device
	numbers, since the former are much more likely to differ.
-rw-r--r--ChangeLog5
-rw-r--r--io/ftw.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 80df15dc09..5c711b8407 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-25  Jim Meyering  <jim@meyering.net>
+
+	* io/ftw.c (object_compare): Compare inode numbers before device
+	numbers, since the former are much more likely to differ.
+
 2003-02-01  Ulrich Drepper  <drepper@redhat.com>
 
 	* time/tzfile.c (__tzfile_compute): Change return value type to
diff --git a/io/ftw.c b/io/ftw.c
index 26dd77fafa..6b117765cb 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -157,10 +157,10 @@ object_compare (const void *p1, const void *p2)
      accidentally compare `holes' in the structure.  */
   const struct known_object *kp1 = p1, *kp2 = p2;
   int cmp1;
-  cmp1 = (kp1->dev > kp2->dev) - (kp1->dev < kp2->dev);
+  cmp1 = (kp1->ino > kp2->ino) - (kp1->ino < kp2->ino);
   if (cmp1 != 0)
     return cmp1;
-  return (kp1->ino > kp2->ino) - (kp1->ino < kp2->ino);
+  return (kp1->dev > kp2->dev) - (kp1->dev < kp2->dev);
 }